<!--
{
  "availability" : [
    "SwiftPM: 5.6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PackageDescription",
  "identifier" : "/documentation/PackageDescription/Platform/custom(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "PackageDescription"
    ],
    "preciseIdentifier" : "s:18PackageDescription8PlatformV6customyACSSFZ"
  },
  "title" : "custom(_:)"
}
-->

# custom(_:)

Creates a custom platform.

```
static func custom(_ platformName: String) -> Platform
```

## Parameters

`platformName`

The name of the platform.

## Return Value

A `Platform` instance.

## Discussion

Use this function if none of the predefined platform names match the platform you are targeting.

---

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)