bitstadium/HockeySDK-iOS — pull request #2 by ddeville (2012-08-20 15:14:20+00:00)
Title: Make HockeySDK much easier to use as a framework in a host application.

It's currently a bit of a pain to link to the HockeySDK "framework" from a host application.
This commit should hopefully make HockeySDK behave a bit more like an actual framework.

To summarize, we now have a HockeySDK.framework bundle that roughly behaves like a framework on the Mac. We still need to link the libHockeySDK.a with the binary since we cannot dynamically load a library on iOS but apart from this extra step it should work exactly as if you linked against a framework on the Mac. The libCrashReporter.a static library is also combined with the libHockeySDK.a static library so a host application shouldn't even have to worry (or even know!) about linking against the CrashReporter framework.

So, in order to add the HockeySDK framework to a host application, the steps to follow now become:

- Add HockeySDK project as a subproject in the host application project.
- In the host application: Go to the target's Build Phases
- Add HockeySDK (the .framework bundle) to the "Target Dependency" group
- Add libHockeySDK.a to the "Link Binary With Libraries" group
- Create a new "Add Copy Files" Build Phase
- Ensure that the destination is "Resources" and add the HockeySDK.framework
- Ensure that you have added -ObjC to the Other Linker Flags in the Build Settings of your host application

- You can now do #import "HockeySDK/HockeySDK.h" and get going with the Hockey stuff!

- And that's IT! No need to add any bundle to the Copy Bundle Resources, to manually link against the CrashReporter.framework, etc…

You can download a small sample project showing exactly how to do all this here: http://ddvl.me/430f1R3I211u