New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Podspec value for spec.libraries should not be added to OTHER_LIBTOOLFLAGS #2765
Comments
Indeed. Is this something you will want to look into to create a patch for? |
Looking back at the ticket that was about the need to specify |
Sounds like a solution. It would be great if someone could fix that in a meantime. |
I was looking briefly at this and it seems like it would require changing the way that Xcodeproj::Config works to differentiate between |
@k0nserv Is that really need? I have no idea what I am doing, but would something like this work? |
@alloy I was messing around with your suggestion this past thanksgiving break, and I ran into an issue with a few pods using your suggestion. For example, the GoogleAds-IMA-iOS-SDK podspec doesn't use
This means that if you add only the pod target and |
Will this issue be solved? |
This was fixed by #3677. |
I've encountered an issue while building static library target which depends on a pod with dynamic library dependencies. That's needed for running tests on the library.
In this case cocoapods add these dynamic libraries flags to my static library's OTHER_LD_FLAGS which is copied to OTHER_LIBTOOLFLAGS, which produces errors like this:
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lsqlite3
while build.
This happens because dynamic libraries should only be linked to the app, and should not be linked to static library.
So, values, specified in spec.libraries should go to OTHER_LD_FLAGS but not to OTHER_LIBTOOLFLAGS.
Here is the sample project to demonstrate the issue.
Replacing
pod 'AFNetworking'
with
pod 'AFNetworking', :podspec => '.'
and running
pod install
orpod update
reproduces that.The text was updated successfully, but these errors were encountered: