I'm having a similar issue, with internal xcframeworks packaged in Cocoapods : Failed to build module 'Common'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)', while this compiler is 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.9.10 clang-1600.0.26.2)'). Please select a toolchain which matches the SDK.
The problem, is that the xcframeworks were built using Xcode 16.0, with BUILD_LIBRARY_FOR_DISTRIBUTION set to YES, but and I'm getting this error on Xcode 16.0 in an app that I'm trying to build using those xcframeworks.
Update : I don't reproduce the problem when using the xcframeworks directly instead of through cocoapods, so I guess that's where the problem lies.