I recently created an iOS project utilizing cocoa pods to install AfNetworking. I zipped the project and send to someone to check out. They are saying they cannot run the project and they are getting an error because the libpods.a is missing. My assumption is that they didnt open the project from the xcworkspace and tried to open via xcproj, but havent been able to confirm.
Someone who receives a cocoapods based application doesn't need to run pod:install on their machine do they?? (They do not have cocoapods on their machine. )
If the project folder (including the workspace and all subfolders such as the Pods folder) has been zipped in its entirety, and you've got it working on your machine, then the pods folder and its contents should be present, and the problem is probably that the project has been opened instead of the workspace.
You don't need Cocoapods installed at build time. You need it to create and populate the pods project and set up the workspace, but once that done, nothing else is needed until you want to update the Podfile.
Related
I pulled from git and everything works fine except I got this error even though I can still run the project. Is there a way to fix this?
This usually means there was a merge conflict that got committed to the actual project.pbxproj file.
Since this is a Pods project (which is ephemeral and can be recreated at will) you can run pod install from the command line (in the same folder as your Podfile and it will regenerate the project.
problem:- Workspace integrity (could not load project) I got the same issue also I hit and try many solutions (Restart mac, Cache data remove, pods update, pods install, etc) but all in vain.
Solution : Once I try to open the project the "Xcode.copy" opened intead of my original Xcode . I just close all projects after that I open the project from selecting Xcode directly from the finder.
Note:- do not go to the project folder then open project from "projectName.xcworkspace"
you just need to go finder(Spotlite search) and open Xcode and open from finder then you must select the desired project. The project will work perfectly and after that you can open project manually (in your folder etc)
:) These things working from my side.
I recently switched computers and brought over my project but when I opened the workspace I noticed that all of my frameworks via Cocoapods were missing.
I closed the workspace and went into the folder directory and deleted the current xcworkspace, 'Pod' folder, and podfile.lock file, and ran a pod update and pod install. I also deleted the Derived Data for safety measures. However, after reopening the newly created workspace the frameworks were still missing and I am getting an error saying that functions that are within my frameworks have been renamed.
Can anyone point me to another solution? I feel like I've tried just about everything that I could find on here and what I know. Thanks in advance!
Missing Frameworks
Framework Incorrect Full Path
Function Renamed Errors
The frameworks are probably missing because they've not been built yet, but they will show up the first time you run the project.
The function rename warnings are probably because you're using a newer version of Xcode that is using Swift 4.2 by default. Usually the easiest way to tackle this is to upgrade your Pods to newer versions.
I moved all my Xcode projects on to an external harddrive because my macbook was running low on space. Cocoapods have started to act weird now.
When I try to initialize a new podfile via terminal with pod init, I get the message:
[!] Multiple Xcode projects found, please specify one.
When I try to update or install an existing podfile, I get the message:
[!] Could not automatically select an Xcode project. Specify one in your Podfile like so:
project 'path/to/Project.xcodeproj'
Nothing seems to work. Is there any way I can get cocoapods to work with projects on an external harddrive?
The directories I have tried all have only one xcode project and I'm definitely in the right directory.
"Invisible copies of files prefixed with "._" are created on shared volumes and external disks that are formatted to work with both macOS and Windows. These invisible files are "resource fork" segments of files that are being created on the external volume."
- https://www.cnet.com/news/invisible-files-with-prefix-are-created-on-some-shared-volumes-and-external-disks/
These copies were preventing me from initializing or updating my podfiles.
Solution 1:
Go to the directory where you want to initialize a pod or the directory of the podfile you want to update in terminal. Type ls -a to list all files including hidden ones. Then type rm "._(NameOfFile)" to remove the copy. You should then be able to work with the podfile freely.
Solution 2 (Permanent):
Solution 2 is a permanent one but requires reformatting the external drive to Macintosh-Extended so the ._ file copies are not created.
The link above also gives some other ways to deal with ._ files without reformatting the external drive.
Im building a IOS app that uses a third-party library.
The library project is inherited from another developer that im unable to ask anything.
It is configured to use CocoaPods to manage dependencies, it has a lot of them.
When i run "pod install" it downloads all of them and creates the workspace.
In the workspace i have set the app target as dependent from the framework project product
Then i try to build it and it says it cannot find one of the dependencies of the framework project (it is on the podfile)
Then i found the framework project is missing "[CP] Embed Pods Frameworks" in build phases (the app project has it)
Also the "Pods_[targetName].framework" is shown in red (even when it indeed is in the build products folder, the path is correct)
I found this issue that seems to be exactly my problem but im unable to see if it has been fixed or not and what could i do to workaround this.
Same effect for me, my issue was the s.source_files in the podspec did not reference a location with actual files after a refactor.
Original issue: xcodeproj components didn't display in workspace
I've installed Cocoapods on my machine. When I install a pod in a project, a workspace is created, but when I open the workspace the files associated with the original project don't display. I had Xcode closed when I created the pod. I've attached a screen cap of my project after installing the Pods.
I think I've got an installation problem, but I don't know where I need to look to fix it. What/where should I be checking?!
Update: Compiler error
The following compiler error comes up when I open the workspace file:
podsexample.xcodeproj Couldn't load podsexample.xcodeproj because it is already opened from another project or workspace
I closed Xcode when I created the pod, so I'm stumped on this one.
Update 2: It works, but is this the way it's supposed to work? I got partway to the answer to my problem by following the steps outlined in this helpful post:
Can't get to work CocoaPods and Yosemite
In order to open the workspace file correctly, I have to run 'pod setup' each time. Are CocoaPods supposed to work like this, or is setup supposed to be a one time thing? If I've got an installation/configuration problem, where/what should I be looking at to fix?
Screen Cap of Original Issue
podsexample.xcodeproj Couldn't load podsexample.xcodeproj because it is already opened from another project or workspace
Looks like you had two copies of Xcode open with the same project. One was inside the Xcodeworkspace that CocoaPods created, and the other was the original Xcodeproject itself. Xcode doesn't allow this, so it won't compile as long as both are open. You only need to open the XCWorkspace.