Sometimes it can be quite useful to hide a static library inside another one to hide the details of the inner static library from an application. We successfully did this with the Urban Airship library, but were having problems in a specific situation where the application would crash on first access of a method defined in the inner static library.
- Create an application that links against a static library (A), which in turn links against an already compiled static library (B)
- In the main application, write code that invokes a method defined in library (B)
- Archive the application
- Export the application into an IPA
- Run this IPA on a device
- Witness an EXC_CRASH (SIGSYS) in the crash log
I found the solution, which describes a bug in Xcode 4.3+. This still happens in Xcode 4.4.
“When performing an Archive action, Xcode uses the *project-level* build setting for STRIP_INSTALLED_PRODUCT rather than the target-level setting.”
More info here: