Module compiled with Swift 6.0.3 cannot be imported by the Swift 6.1 compiler: /private/var/tmp/_bazel_xx/8b7c61ad484d9da1bf94a11f12ae6ffd/rules_xcodeproj.noindex/build_output_base/execroot/main/CustomModules/BIYThred/CocoaLumberjack/framework/CocoaLumberjack.framework/Modules/CocoaLumberjack.swiftmodule/arm64-apple-ios.swiftmodule
This is expected. A .swiftmodule
file is tightly bound to the compiler that created it and can’t be shared between versions.
If you want to do this then you need to build your framework for distribution. This enables library evolution mode, which generates a .swiftinterface
file. If a framework is built that way with Swift compiler version N then the version M compiler will be able to use it, assuming M ≥ N.
In Xcode, check out the Build Libraries for Distribution build setting. If you’re using Swift outside of Xcode, check out SE-0260 Library Evolution for Stable ABIs.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"