Setting Swift Package platform to iOS 15+, macOS 12+, watchOS 8+ not available?

In Xcode 13 first beta release, this doesn't compile in Package.swift:

// swift-tools-version:5.5

let package = Package(
    name: "WWDC21Test",
    platforms: [
        .iOS(.v15) // Error: Reference to member 'v15' cannot be resolved without a contextual type
    ],
    ...
)

Has the API changed, I can't find anything about it in the docs?

Beta 1 doesn't have the new constants, yet, they'll be coming in a future beta: [5.5] Add constants for new OS versions by neonichu · Pull Request #3538 · apple/swift-package-manager · GitHub

However, you can use the string literal version, e.g. .iOS("15.0")

10 Likes