We distribute our SDK in a binary framework that's wrapped in a xcframework.
The option BUILD_LIBRARY_FOR_DISTRIBUTION is enabled to get library evolution support.
Our project is compiled in Xcode 11.4 and Swift 5.2. One of our customers is still on Xcode 11.3.1 and Swift 5.1.3, when the customer adds our SDK, he get's compilation errors for the swiftinterface for some annotations (
@_hasMissingDesignatedInitializers) which do not exist in Swift 5.1.3, and thus the project can not be compiled.
I confirmed that compiling with Swift 5.1.3 does not add the annotations.
Is this something that is supposed to happen? Is it odd of me to think that compiling using Swift 5.2 would work on all Swift 5 versions? Is it something we can fix without switching to a different Swift version?
Before, we created our own fat framework (but with the older Xcode and Swift version), it did not include the swiftinterface and it works fine for this customer. We switched on BUILD_LIBRARY_FOR_DISTRIBUTION so we don't have to require our customers to have the same Swift version.