Building a Framework (sim and device)

Hi

I'm using Xcode 7.3 and developed a Swift class library as a framework for other developers to use in iOS apps. I'm having troubles with the build whereby the resulting framework file will work in the simulator and device without having to create 2 separate frameworks. Is there any guidance on how to build a single framework?


Thanks

Replies

Frameworks distributed as a compiled binary cannot contain Swift code, because you cannot guarantee the Swift runtime environment the framework expects matches the runtime environment provided by the app containing the framework. The only way to distribute a framework with Swift is to distribute source code so the app using the framework builds the framework each time the app builds to ensure the runtime environments of the framework and the app match.