Compiling my project using Xcode 27.1 ends with an error:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/System/Library/Frameworks/SwiftUI.framework/Modules/SwiftUI.swiftmodule/arm64e-apple-macos.swiftinterface:1:1: error: failed to build module 'SwiftUI'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.4 effective-5.10 (swiftlang-6.4.0.31.4 clang-2100.3.31.1)', while this compiler is 'Apple Swift version 6.4 effective-5.10 (swiftlang-6.4.0.34.1 clang-2100.3.34.1)'). Please select a toolchain which matches the SDK.
1 | // swift-interface-format-version: 1.0
| `- error: failed to build module 'SwiftUI'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.4 effective-5.10 (swiftlang-6.4.0.31.4 clang-2100.3.31.1)', while this compiler is 'Apple Swift version 6.4 effective-5.10 (swiftlang-6.4.0.34.1 clang-2100.3.34.1)'). Please select a toolchain which matches the SDK.
2 | // swift-compiler-version: Apple Swift version 6.4 effective-5.10 (swiftlang-6.4.0.31.4 clang-2100.3.31.1)
3 | // swift-module-flags: -target arm64e-apple-macos27.0 -enable-objc-interop -target-arch-variant arm64e.x1 -enable-library-evolution -language-mode 5 -O -library-level api -enable-experimental-feature AnyAppleOSAvailability -enable-upcoming-feature InferSendableFromCaptures -enable-experimental-feature DebugDescriptionMacro -enable-bare-slash-regex -user-module-version 8.0.84.1.406 -module-name SwiftUI -package-name SwiftUI
Compiling it with Xcode 27 ends without error.
Do you see any other root cause than the one mentionned: Xcode 27.1 uses swiftlang-6.4.0.34.1 clang-2100.3.34.1 while internal sdk was compiled with swiftlang-6.4.0.31.4 clang-2100.3.31.1 ?