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:
Library/Developer/Xcode/DerivedData/MyProject-eegsyonkmltdqhggwyqytoqbwath/Build/Products/
). 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:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With