SPM packages fail for watchOS Xcode 27

Xcode 27 refuses to build common Swift Packages for watchOS, such as swift-algorithms or swift-collections.

... 'WATCHOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 27.0.x.

The error disappears by explicitly declaring in the SPM manifest "platforms: [.watchOS(.v9)]". (Patching the "SwiftStdlib" availabilities in swift-collections is insufficient.)

Is there a better workaround than mirroring our whole SPM graph to declare the platform minimum?

Our projects' minimums are correctly set at 11 or 26. (Also happens in the hello world Xcode 27 watchOS only project.)

FB23037701 ref: https://developer.apple.com/forums/thread/829540

Answered by Systems Engineer in 891277022

I don't think there's any way you can work around this. But it looks like it was just addressed here: https://github.com/swiftlang/swift-package-manager/pull/10188

Accepted Answer

I don't think there's any way you can work around this. But it looks like it was just addressed here: https://github.com/swiftlang/swift-package-manager/pull/10188

Great. We'll update our toolchain for that. (Mirroring our SPM graph does provide an immediate workaround, albeit not ideal.)

SPM packages fail for watchOS Xcode 27
 
 
Q