Captain Jack sparrow Captain Jack sparrow - 1 month ago 14
iOS Question

Do I have to include third party frameworks separately with my app?

I am building an iOS cocoa touch static library. It depends on a third party framework. Would I have to ship the framework with my app or not?

I am guessing that the definition of static library means that the output .a file should already have the necessary parts of the included framework and therefore I should not have to supply the framework separately. Is that true ?


When you "Ship" your app, xcode creates an .ipa file where everything is bundled together so you dont have to do anything extra....

Although from what I understand your actual question is when you include a third party static library in your app and that static library uses other frameworks, Do you need to include those libraries in your app or not?

If that is the question then answer is yes, let's say your .a static library depends on AFNetworking framework(a popular third party framework) or/and needs CoreLocation.framework by apple, then in your apps settings

Build Phases -> Link Library With Libraries you need to import those frameworks that your static library uses, then when you build and "ship" your app to the appstore, xcode takes care of it(bundles) it. So you dont have to worry.

ALTERNATIVE SOLUTION: It is also possible that you can just add source code of third party frameworks and when you build your .a framework everything is bundled. If you do that you need to make sure class names and method names are unique though.