Apple recently introduced dynamic frameworks to iOS and the Xcode tool set. Dynamic frameworks have long been a vital part of developing for MacOS, but Xcode did not support building them for iOS. Static frameworks have always been possible, but Xcode’s support for them has been limited and cumbersome. Until recently, Xcode could not build dynamic frameworks for deployment on iOS.

Publically, dynamic frameworks are only supported on iOS 8 and later. Fortunately dynamic frameworks can be loaded by applications and used on earlier versions of iOS. If you have avoided using dynamic frameworks because you need to deploy on iOS 7, there is hope.

Doing so is fairly straightforward. The application must weak link against the framework. To do so, in your application target’s “Link Binary With Libraries” Build Phase, designate the framework as “Optional”. This will weakly link against the framework.

Once you have done so, you must follow the established guidelines for using weakly linked bundle resources, classes and symbols.

The deployment targets and architectures of your application and framework must match, and must use APIs that are available on those OS versions and architectures. “App Extension” APIs do not exist on iOS versions previous to iOS 8. A framework that uses the “App Extension” APIs should be kept separate from non-extension code.

An example project that demonstrates using a framework on iOS 7 is available on github.