Skip to content

Commit 01c8363

Browse files
authored
Update minimum deployment targets for the Apple platforms (#5567) (#5571)
Add the next version of each Apple platform to match the WWDC 2022 Xcode beta release. (cherry picked from commit 904052c)
1 parent a0137e3 commit 01c8363

File tree

2 files changed

+62
-1
lines changed

2 files changed

+62
-1
lines changed

Sources/PackageDescription/SupportedPlatforms.swift

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the Swift open source project
44
//
5-
// Copyright (c) 2018-2020 Apple Inc. and the Swift project authors
5+
// Copyright (c) 2018-2022 Apple Inc. and the Swift project authors
66
// Licensed under Apache License v2.0 with Runtime Library Exception
77
//
88
// See http://swift.org/LICENSE.txt for license information
@@ -316,6 +316,12 @@ extension SupportedPlatform {
316316
/// - Since: First available in PackageDescription 5.5.
317317
@available(_PackageDescription, introduced: 5.5)
318318
public static let v12: MacOSVersion = .init(string: "12.0")
319+
320+
/// The value that represents macOS 13.0.
321+
///
322+
/// - Since: First available in PackageDescription 5.7.
323+
@available(_PackageDescription, introduced: 5.7)
324+
public static let v13: MacOSVersion = .init(string: "13.0")
319325
}
320326

321327
/// The supported tvOS version.
@@ -367,6 +373,12 @@ extension SupportedPlatform {
367373
/// - Since: First available in PackageDescription 5.5.
368374
@available(_PackageDescription, introduced: 5.5)
369375
public static let v15: TVOSVersion = .init(string: "15.0")
376+
377+
/// The value that represents tvOS 16.0.
378+
///
379+
/// - Since: First available in PackageDescription 5.7.
380+
@available(_PackageDescription, introduced: 5.7)
381+
public static let v16: TVOSVersion = .init(string: "16.0")
370382
}
371383

372384
/// The supported Mac Catalyst version.
@@ -398,6 +410,12 @@ extension SupportedPlatform {
398410
/// - Since: First available in PackageDescription 5.5.
399411
@available(_PackageDescription, introduced: 5.5)
400412
public static let v15: MacCatalystVersion = .init(string: "15.0")
413+
414+
/// The value that represents Mac Catalyst 16.0.
415+
///
416+
/// - Since: First available in PackageDescription 5.7.
417+
@available(_PackageDescription, introduced: 5.7)
418+
public static let v16: MacCatalystVersion = .init(string: "16.0")
401419
}
402420

403421
/// The supported iOS version.
@@ -454,6 +472,12 @@ extension SupportedPlatform {
454472
/// - Since: First available in PackageDescription 5.5.
455473
@available(_PackageDescription, introduced: 5.5)
456474
public static let v15: IOSVersion = .init(string: "15.0")
475+
476+
/// The value that represents iOS 16.0.
477+
///
478+
/// - Since: First available in PackageDescription 5.7.
479+
@available(_PackageDescription, introduced: 5.7)
480+
public static let v16: IOSVersion = .init(string: "16.0")
457481
}
458482

459483
/// The supported watchOS version.
@@ -505,6 +529,12 @@ extension SupportedPlatform {
505529
/// - Since: First available in PackageDescription 5.5.
506530
@available(_PackageDescription, introduced: 5.5)
507531
public static let v8: WatchOSVersion = .init(string: "8.0")
532+
533+
/// The value that represents watchOS 9.0.
534+
///
535+
/// - Since: First available in PackageDescription 5.7.
536+
@available(_PackageDescription, introduced: 5.7)
537+
public static let v9: WatchOSVersion = .init(string: "9.0")
508538
}
509539

510540
/// The supported DriverKit version.
@@ -530,6 +560,10 @@ extension SupportedPlatform {
530560
/// The value that represents DriverKit 21.0.
531561
@available(_PackageDescription, introduced: 5.5)
532562
public static let v21: DriverKitVersion = .init(string: "21.0")
563+
564+
/// The value that represents DriverKit 22.0.
565+
@available(_PackageDescription, introduced: 5.7)
566+
public static let v22: DriverKitVersion = .init(string: "22.0")
533567
}
534568
}
535569

Tests/PackageLoadingTests/PD_5_7_LoadingTests .swift

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,31 @@ class PackageDescription5_7LoadingTests: PackageDescriptionLoadingTests {
126126
}
127127
}
128128
}
129+
130+
func testPlatforms() throws {
131+
let content = """
132+
import PackageDescription
133+
let package = Package(
134+
name: "Foo",
135+
platforms: [
136+
.macOS(.v13), .iOS(.v16),
137+
.tvOS(.v16), .watchOS(.v9),
138+
.macCatalyst(.v16), .driverKit(.v22),
139+
]
140+
)
141+
"""
142+
143+
let observability = ObservabilitySystem.makeForTesting()
144+
let manifest = try loadManifest(content, observabilityScope: observability.topScope)
145+
XCTAssertNoDiagnostics(observability.diagnostics)
146+
147+
XCTAssertEqual(manifest.platforms, [
148+
PlatformDescription(name: "macos", version: "13.0"),
149+
PlatformDescription(name: "ios", version: "16.0"),
150+
PlatformDescription(name: "tvos", version: "16.0"),
151+
PlatformDescription(name: "watchos", version: "9.0"),
152+
PlatformDescription(name: "maccatalyst", version: "16.0"),
153+
PlatformDescription(name: "driverkit", version: "22.0"),
154+
])
155+
}
129156
}

0 commit comments

Comments
 (0)