<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "PackageDescription",
  "identifier" : "/documentation/PackageDescription/SupportedPlatform",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "PackageDescription"
    ],
    "preciseIdentifier" : "s:18PackageDescription17SupportedPlatformV"
  },
  "title" : "SupportedPlatform"
}
-->

# SupportedPlatform

A platform that the Swift package supports.

```
struct SupportedPlatform
```

## Overview

By default, Swift Package Manager assigns a predefined minimum deployment version for each
supported platforms unless you configure supported platforms using the
`platforms` API. This predefined deployment version is the oldest deployment
target version that the installed SDK supports for a given platform. One
exception to this rule is macOS, for which the minimum deployment target
version starts from 10.10. Packages can choose to configure the minimum
deployment target version for a platform by using the APIs defined in this
struct. Swift Package Manager emits appropriate errors when an invalid value is provided for
supported platforms, such as an empty array, multiple declarations for the
same platform, or an invalid version specification.

Swift Package Manager emits an error if a dependency isn’t compatible with the top-level
package’s deployment version. The deployment target of a package’s
dependencies must be lower than or equal to the top-level package’s
deployment target version for a particular platform.

## Topics

### Supporting iOS

[`iOS(_:)`](/documentation/PackageDescription/SupportedPlatform/iOS(_:)-5pvv5)

Configures the minimum deployment target version for the iOS platform.

[`iOS(_:)`](/documentation/PackageDescription/SupportedPlatform/iOS(_:)-83bbf)

Configures the minimum deployment target version for the iOS platform
using a custom version string.

[`iOS`](/documentation/PackageDescription/Platform/iOS)

[`SupportedPlatform.IOSVersion`](/documentation/PackageDescription/SupportedPlatform/IOSVersion)

The supported iOS version.

### Supporting macOS

[`macOS(_:)`](/documentation/PackageDescription/SupportedPlatform/macOS(_:)-2wthp)

Configures the minimum deployment target version for the macOS platform.

[`macOS(_:)`](/documentation/PackageDescription/SupportedPlatform/macOS(_:)-9771f)

Configures the minimum deployment target version for the macOS platform
using a version string.

[`macOS`](/documentation/PackageDescription/Platform/macOS)

[`SupportedPlatform.MacOSVersion`](/documentation/PackageDescription/SupportedPlatform/MacOSVersion)

The supported macOS version.

### Supporting watchOS

[`watchOS(_:)`](/documentation/PackageDescription/SupportedPlatform/watchOS(_:)-t998)

Configure the minimum deployment target version for the watchOS
platform.

[`watchOS(_:)`](/documentation/PackageDescription/SupportedPlatform/watchOS(_:)-4lrx0)

Configure the minimum deployment target version for the watchOS
platform using a custom version string.

[`watchOS`](/documentation/PackageDescription/Platform/watchOS)

[`SupportedPlatform.WatchOSVersion`](/documentation/PackageDescription/SupportedPlatform/WatchOSVersion)

The supported watchOS version.

### Supporting visionOS

[`visionOS(_:)`](/documentation/PackageDescription/SupportedPlatform/visionOS(_:)-3ip0z)

Configure the minimum deployment target version for the visionOS
platform.

[`visionOS(_:)`](/documentation/PackageDescription/SupportedPlatform/visionOS(_:)-6ur2u)

Configure the minimum deployment target version for the visionOS
platform using a custom version string.

[`visionOS`](/documentation/PackageDescription/Platform/visionOS)

[`SupportedPlatform.VisionOSVersion`](/documentation/PackageDescription/SupportedPlatform/VisionOSVersion)

The supported visionOS version.

### Supporting tvOS

[`tvOS(_:)`](/documentation/PackageDescription/SupportedPlatform/tvOS(_:)-6931l)

Configures the minimum deployment target version for the tvOS platform.

[`tvOS(_:)`](/documentation/PackageDescription/SupportedPlatform/tvOS(_:)-3k8sy)

Configures the minimum deployment target version for the tvOS platform
using a custom version string.

[`tvOS`](/documentation/PackageDescription/Platform/tvOS)

[`SupportedPlatform.TVOSVersion`](/documentation/PackageDescription/SupportedPlatform/TVOSVersion)

The supported tvOS version.

### Supporting MacCatalyst

[`macCatalyst(_:)`](/documentation/PackageDescription/SupportedPlatform/macCatalyst(_:)-6bh40)

Configures the minimum deployment target version for the Mac Catalyst platform.

[`macCatalyst(_:)`](/documentation/PackageDescription/SupportedPlatform/macCatalyst(_:)-9wbz)

Configures the minimum deployment target version for the Mac Catalyst platform
using a version string.

[`macCatalyst`](/documentation/PackageDescription/Platform/macCatalyst)

[`SupportedPlatform.MacCatalystVersion`](/documentation/PackageDescription/SupportedPlatform/MacCatalystVersion)

The supported Mac Catalyst version.

### Supporting DriverKit

[`driverKit(_:)`](/documentation/PackageDescription/SupportedPlatform/driverKit(_:)-jxlz)

Configures the minimum deployment target version for the DriverKit platform.

[`driverKit(_:)`](/documentation/PackageDescription/SupportedPlatform/driverKit(_:)-6evdd)

Configures the minimum deployment target version for the DriverKit platform
using a custom version string.

[`driverKit`](/documentation/PackageDescription/Platform/driverKit)

[`SupportedPlatform.DriverKitVersion`](/documentation/PackageDescription/SupportedPlatform/DriverKitVersion)

The supported DriverKit version.

### Supporting Custom Platforms

[`custom(_:versionString:)`](/documentation/PackageDescription/SupportedPlatform/custom(_:versionString:))

Configures the minimum deployment target version for custom platforms.

### Operator Functions



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)