Let's start by existing questions,
Module compiled with Swift 5.1 cannot be imported by the Swift 5.1.2 compiler
Module compiled with Swift 5.1 cannot be imported by the Swift 5.0 compiler
Module compiled with Swift 5.1.2 cannot be imported by the Swift 5.2.4 compiler
And, now with XCode 12(12A7209)
Module compiled with Swift 5.2.4 cannot be imported by the Swift 5.3 compiler
The framework was compiled in the lower version of Swift (Swift 5.2.4). However, it worked perfectly with XCode 12 beta.
Solution tried:
Build Libraries for Distribution
to Yes
Whole point is the Swift ABI stability for binary framework and how to achieve it across different swift version.
Please advice. Thank you in advance!
You need Module Stability, not ABI stability.
The difference and the way how to achieve Module Stability, are described here: https://www.donnywals.com/what-is-module-stability-in-swift-and-why-should-you-care/
Here is WWDC session that explains swift binary frameworks (time code: 17:00).
Briefly, your framework
Build Libraries for Distribution
set to Yes
Skip Install
property to No
..xcframework
with variants for simulator and deviceYou'll need to ensure that frameworks embedded into .xcframework
all have .swiftinterface
file inside of Modules/<name>.swiftmodule
folder.