Search code examples
iosswiftxcodexcode10swift4.2

Swift compatibility Issue in Xcode 9.4 while using Swift 4.2 compiled framework


I have Xcode 9.4 and my framework code running in swift 3.2 and then today I downloaded Xcode 10 beta 4 and updated my framework to swift 4.2

The question is now my framework is not supporting by Xcode 9.4 and it's giving me an error says :

  • Module compiled with Swift 4.2 cannot be imported in Swift 4.1.2:

My question is is it possible to use swift 4.2 compiled framework in Xcode 9.4 ? if it's not why? do I have to change any settings in order to work ?

Any help? thanks in advance..


Solution

  • Apple is providing support to ABI in swift 5 but tills that swift is part of the app, not iOS SDK, so you to compile your project again with Xcode 9.4 as swift 4.2 is not the official part of Xcode 9.4. "Till swift 5.0 swift will be part of the app itself not system"

    Or just compile the code with swift 4.1.2 and it will run on the Xcode 10 beta without error