Search code examples
iosframeworksdynamic-library

Is it possible to share an installation of an iOS framework you have created between multiple apps?


Since Xcode 6/iOS 8, it has been possible to create a framework for use with iOS apps. There is a template for this called 'Cocoa Touch Framework' under Framework & Library when creating a new project in Xcode.

I haven't found much useful/up-to-date information on this in the Apple Developer Docs, but there are a few other sites which do cover the basics for creation and use of this type of framework, for example:

http://insert.io/frameworkios8xcode6/

However everything I've found so far focusses more on distributing a framework you have created with every app that uses it. So, while this is a useful way to share code between multiple projects, you still end up taking up space on the device with multiple copies of the same framework if you create more than one app that uses that framework and users end up installing more than one of the apps that use it. This seems to negate one of the benefits of dynamic frameworks/libraries whereby multiple programs can link to the same library.

So the question is: Does anyone know whether it is possible to install and share a single copy of a framework that you have created on a device and share it between multiple apps? You'd really need versioning of the framework so that, for major revisions where the interface to the framework changed, you could have your apps reference the version they were built against (under these circumstances, you would end up with more than one copy of the library, but for a good reason).

Any info would be appreciated even if it is to say "You can't do that [yet]"

Thanks

p.s. Questions which cover a similar area but which don't answer this question are:

Are private frameworks supported on iOS? Do iOS apps share frameworks? - This one is almost the same question, but the only answer is from before the introduction of dynamic frameworks to iOS (for non-Apple devs).


Solution

  • Nope. Your own frameworks are restricted in its own sandbox