Skip to content
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

Using pods in static library targets is broken in 0.34.x and Xcode 6. #2666

Closed
alloy opened this issue Oct 14, 2014 · 3 comments · Fixed by #2676
Closed

Using pods in static library targets is broken in 0.34.x and Xcode 6. #2666

alloy opened this issue Oct 14, 2014 · 3 comments · Fixed by #2676
Assignees
Labels
d2:moderate A moderately-difficult ticket that may require a bit of knowledge about the codebase s3:detailed Issues with in-depth explanations and examples that make it easier to troubleshoot t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome!
Milestone

Comments

@alloy
Copy link
Member

alloy commented Oct 14, 2014

This ticket supersedes #2319.

With Xcode 6:

  • When building app targets, the OTHER_LDFLAGS flag is used to link and passed to ld.
  • When building a static library, the OTHER_LIBTOOLFLAGS flag is used to link and passed to libtool.

Thus, Xcode 6 no longer links in the pods dependencies into the user's static library target.

The simple fix is:

  • Add OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) to the Pods.CONFIGURATION.xcconfig files.
  • Override OTHER_LIBTOOLFLAGS to be blank on the Pods target in the Pods.xcodeproj, just like we already do with OTHER_LDFLAGS.
@alloy alloy added t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome! s3:detailed Issues with in-depth explanations and examples that make it easier to troubleshoot d2:moderate A moderately-difficult ticket that may require a bit of knowledge about the codebase labels Oct 14, 2014
@alloy alloy added this to the 0.34.3 milestone Oct 14, 2014
@kylef kylef self-assigned this Oct 14, 2014
@alloy
Copy link
Member Author

alloy commented Oct 18, 2014

Fixed by #2676.

@duhanebel
Copy link

I think this introduces another issue with IB designable. Libtool doesn't seem to like the "-ObjC" flag that is passed on LD_FLAGS and fails compilation when compiling for IBDesignables a View that links against a static library. The error is:

[...]/usr/bin/libtool: unknown option character W' in: -Wl,-pie

Removing "-ObjC" from OTHER_LIBTOOLFLAGS seem to fix the problem for IBDesignable builds.

@lemonkey
Copy link

lemonkey commented Aug 6, 2015

Seeing the same issue when trying to build for IB designable for XIBs in a static library that uses Cocoapods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
d2:moderate A moderately-difficult ticket that may require a bit of knowledge about the codebase s3:detailed Issues with in-depth explanations and examples that make it easier to troubleshoot t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants