Andrea
Andrea

Reputation: 219

Swift framework problems with Xcode compatibility

I have a framework that I distribute to customers without giving them access to the source code, depending on which version of Xcode I use to build it, they get errors like module compiled with Swift 4.1 cannot be imported in Swift 3.2.3 when importing the file . I couldn't find any setting in the project that allowed me to build backwards compatible version of my framework. Specifically the problem is between 9.2 and 9.3, but at the same time this seems to be a common problem, how can I build the framework so that it works with all the previous versions of Xcode?

Upvotes: 0

Views: 886

Answers (1)

Aaron Bratcher
Aaron Bratcher

Reputation: 6451

Until Swift 5 is released with ABI stability, your library has to be compiled with the same version of Swift as the parent app. This means multiple copies out there based on Swift / Xcode version.

Once Swift 5 is released, then you can compile a copy to be used in any app compiled with Swift 5 or greater.

Upvotes: 2

Related Questions