Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

Fix header search paths while archiving #100

Merged
merged 6 commits into from Jan 22, 2016

Conversation

sharplet
Copy link
Contributor

There's a portion of Apple's "Using Static Libraries in iOS" guide that describes this problem with the "Headers" build phase when using static libraries (emphasis added):

Your library will have one or more header files that clients of that library need to import. To configure which headers are exported to clients, select your library project to open the project editor, select the library target to open the target editor, and select the build phases tab. If your library target has a “Copy Headers” build phase, you should delete it; copy headers build phases do not work correctly with static library targets when performing the “Archive” action in Xcode.

When trying to integrate Tweaks into our workspace, we found the same issue: archiving our app was broken.

We've updated FBTweak.xcodeproj to use a custom "Copy Files" build phase that places the public headers into include/FBTweak/, relative to the built products directory. This location is automatically added to the header search paths by Xcode, and thus it is no longer necessary to add $(SYMROOT)/Headers to the header search paths when building Tweaks from a workspace.

To test this, we've updated .travis.yml to perform an archive action in addition to running the tests.

@facebook-github-bot
Copy link
Contributor

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

@grp
Copy link
Contributor

grp commented Jan 18, 2016

Interesting! Didn't know about that.

The change looks good, but the Travis build is failing. It looks like it's missing a code signing identity, so you might need to turn off code signing for the archive build there?

See the "SIGNING IDENTITIES" section in the manual entry for
`codesign(1)` for details. This allows us to sign without a signing
identity on CI.
@sharplet
Copy link
Contributor Author

Ok I think I found the right incantation @grp. I'm just waiting on my company to take a look at the CLA. Let me know if there's anything else!

@sharplet
Copy link
Contributor Author

@grp Just signed the CLA, let me know if there's anything else!

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

grp added a commit that referenced this pull request Jan 22, 2016
Fix header search paths while archiving
@grp grp merged commit 26f5427 into facebookarchive:master Jan 22, 2016
@grp
Copy link
Contributor

grp commented Jan 22, 2016

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants