I have a Swift app written many years ago that uses a few 3rd party libraries, some of which are built with older version of Swift (like 5.2.4), and one of them is written in Obj-C.
I just upgraded to MacOS 12.4 and XCode 13.4 (with Carthage as package manager:
carthage update --use-xcframeworks --platform iOS)
Since I use 3rd party libraries built with older versions of Swift, I have set "Build Libraries for Distribution" to Yes (under Build Settings).
However, when I try to build from XCode, I still get:
Module compiled with Swift 5.2.4 cannot be imported by the Swift 5.6.1 compiler:/Users/Joe/Desktop/SomeApp/Carthage/Build/iOS/ObjectMapper.framework/Modules/ObjectMapper.swiftmodule/arm64.swiftm
I thought "Build Libraries for Distribution=Yes" was supposed to make it possible to use Swift modules with different 5.x versions of Swift, so why am I still getting the above error?
Update: the issue above appears to have been handled by deleting the Carthage build folder (and re-running
carthage update --use-xcframeworks --platform iOS).Now I get a different build error instead! (I will create a separate post if I cannot resolve it.)