zoul
zoul

Reputation: 104065

Are private frameworks supported on iOS?

Recently I started to modularize my applications much more aggresively than I used to, separating pieces of code into frameworks or libraries.

I like the concept of “private frameworks” in desktop Cocoa, ie. the frameworks included in the application bundle. From my small experience the frameworks are better suited for code reuse than simple libraries, as the frameworks can include their own headers with them. This makes adding a new framework to an existing project a whole lot easier.

The problem is that these “private” frameworks are not supported on iOS. You have to do with static libraries there, and the header management is a pain. Is there a good technical reason for Apple to not support frameworks on iOS?

(Just to make sure: Apple unfortunately uses the term “private framework” for two things. The first is “custom” frameworks that ship with an application, the second is undocumented and prohibited frameworks that people are not supposed to use on iOS. I’m asking about the former.)

PS. Did this change in iOS 8? There’s a “Cocoa Touch Framework” template in Xcode 6.

Upvotes: 7

Views: 1254

Answers (1)

zoul
zoul

Reputation: 104065

It appears that custom frameworks are now supported by Xcode 6:

iOS developers can now create dynamic frameworks. Frameworks are a collection of code and resources to encapsulate functionality that is valuable across multiple projects. Frameworks work perfectly with extensions, sharing logic that can be used by both the main application, and the bundled extensions.

Upvotes: 2

Related Questions