cocoapods command line build fails
cocoapods, xcode5
Solution
Instead of using `xcodebuild -workspace MyProject.xcworkspace -scheme MyScheme SYMROOT=./build`
Try with this line:
xcodebuild -workspace MyProject.xcworkspace -scheme MyScheme SYMROOT=$(PWD)/build
Hope this will help you.
Explanations here.
Problem
I have just added cocoapods to my project, but cannot get my build script working again. I use this command to make the build: ``` xcodebuild -workspace MyProject.xcworkspace -scheme MyScheme SYMROOT=./build ``` However, when I perform the build, it fails with the error message `ld: library not found for -lPods`. If I build without the SYMROOT set, it works fine. But I would prefer keeping the SYMROOT argument such that I can keep my archiving logic the same way as before. My conclusion so far is, that because SYMROOT is set, xcodebuild cannot find the Pods library that was built. How can I fix this? Edit: I have investigated the file structure after the build a little: - If I do not set SYMROOT, there is a libPods.a file in the folder with the binaries (`Library/Developer/Xcode/DerivedData/MyProject-eegsyonkmltdqhggwyqytoqbwath/Build/Products/`). - If I set the SYMROOT as described above, the libPods.a file is not present in ./build Hence, it seems that the output of the build of the pod files are not set properly. Is it a problem in xcodebuild then, or is there a way that I can ensure that the pod files are built to this folder? The following image shows a comparison of the build output in the two directories to make it more clear: