<!--
{
  "availability" : [
    "SwiftPM: -"
  ],
  "documentType" : "symbol",
  "framework" : "PackageDescription",
  "identifier" : "/documentation/PackageDescription/Package/init(name:platforms:pkgConfig:providers:products:dependencies:targets:swiftLanguageVersions:cLanguageStandard:cxxLanguageStandard:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "PackageDescription"
    ],
    "preciseIdentifier" : "s:18PackageDescription0A0C4name9platforms9pkgConfig9providers8products12dependencies7targets21swiftLanguageVersions01cL8Standard03cxxlN0ACSS_SayAA17SupportedPlatformVGSgSSSgSayAA06SystemA8ProviderOGSgSayAA7ProductCGSayAC10DependencyCGSayAA6TargetCGSayAA05SwiftL4ModeOGSgAA09CLanguageN0OSgAA011CXXLanguageN0OSgtcfc"
  },
  "title" : "init(name:platforms:pkgConfig:providers:products:dependencies:targets:swiftLanguageVersions:cLanguageStandard:cxxLanguageStandard:)"
}
-->

# init(name:platforms:pkgConfig:providers:products:dependencies:targets:swiftLanguageVersions:cLanguageStandard:cxxLanguageStandard:)

Initializes a Swift package with configuration options you provide.

```
init(name: String, platforms: [SupportedPlatform]? = nil, pkgConfig: String? = nil, providers: [SystemPackageProvider]? = nil, products: [Product] = [], dependencies: [Package.Dependency] = [], targets: [Target] = [], swiftLanguageVersions: [SwiftVersion]? = nil, cLanguageStandard: CLanguageStandard? = nil, cxxLanguageStandard: CXXLanguageStandard? = nil)
```

## Parameters

`name`

The name of the Swift package, or `nil`, if you want the Swift Package Manager to deduce the
name from the package’s Git URL.

`platforms`

The list of supported platforms that have a custom deployment target.

`pkgConfig`

The name to use for C modules. If present, the Swift
Package Manager searches for a `<name>.pc` file to get the
additional flags required for a system target.

`providers`

The system package providers that this package uses.

`products`

The list of products that this package makes available for clients to use.

`dependencies`

The list of package dependencies.

`targets`

The list of targets that are part of this package.

`swiftLanguageVersions`

The list of Swift versions that this package is compatible with.

`cLanguageStandard`

The C language standard to use for all C targets in this package.

`cxxLanguageStandard`

The C++ language standard to use for all C++ targets in this package.

---

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)