---
title: "init(identifier:)"
framework: cloudkit
role: symbol
role_heading: Initializer
path: "cloudkit/ckcontainer/init(identifier:)"
---

# init(identifier:)

Creates a container for the specified identifier.

## Declaration

```swift
init(identifier containerIdentifier: String)
```

## Parameters

- `containerIdentifier`: The bundle identifier of the app with the container that you want to access. The bundle identifier must be in the app’s com.apple.developer.icloud-container-identifiers entitlement. This parameter must not be nil.

## Discussion

Discussion The specified identifier must correspond to one of the containers in the iCloud capabilities section of your Xcode project. Including the identifier with your app’s capabilities adds the corresponding entitlements to your app. To access your app’s default container, use the default() method instead.

## See Also

### Creating Containers

- [default()](cloudkit/ckcontainer/default().md)
