MIT License
The idea of the setup shown is to prove on example, how to:
The project is composed of three parts:
Simple app, illustrating situation, where you can include one or more frameworks via CocoaPods.
When launched (only iPhone Simulator for now!) the screen would turn:
Pressing TEST button would print info to the console, using additional SDK features or not.
To enable/disable AdditionalSDK comment or uncomment line #7 in Podfile, and reload pods by executing "rake pods" from main app dir.
Shows how to setup frameworks (MainSDK + AdditionalSDK) in a way, that AdditionalSDK is optional, and the MainSDK would change behaviour depending on its availability.
That includes:
To make weak link between frameworks, you can select optional in linked frameworks section:
Just a Container for "vendored_frameworks". They are compiled only for simulator now.
In the "final setup", when making similar setup to ship your frameworks, you'd probably be using fat binaries, so your users would be able to build for both devices and simulators.
It seems, that when using Objective-C, it is possible to take advantage of weak linking (and thus "optional" frameworks). It seems it is impossible though to do that with Swift only setup.
Potential Improvements: Currently, the MainSDK "Interop" objc files are public. You can make them "private", and still use from Swift, using these hints: