Reputation: 3
Can a framework created with swift support Objective-c projects?
Upvotes: 0
Views: 52
Reputation: 12968
Yes, framework written in swift can be imported and used in Objective-C projects.
However currently it's more convenient to write frameworks in Objective-C as you just need 1 version. People using both Swift and Objective-C can import the framework without any problems.
If you write framework in Swift and someone wants to install it to the project written in incompatible Swift version - it won't work!
You need to set branches and have your project framework compiled under many version of Swift as they are incompatible. Someone using Swift 1.0 can't rung Swift 1.2 or 2.0, someone using 2.0 can't use 1.2 or 1.0.
Upvotes: 1