Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
228 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...