---
title: "init(keySystem:)"
framework: avfoundation
role: symbol
role_heading: Initializer
path: "avfoundation/avcontentkeysession/init(keysystem:)"
---

# init(keySystem:)

Creates a content key session to manage a collection of content decryption keys.

## Declaration

```swift
convenience init(keySystem: AVContentKeySystem)
```

## Parameters

- `keySystem`: A valid key system used to retrieve keys.

## Return Value

Return Value Returns a new AVContentKeySession instance.

## Discussion

Discussion The AVContentKeySession instance returned is capable of managing a collection of content decryption keys that correspond to the input key system. An invalidArgumentException is raised when the value of keySystem is unsupported.

## See Also

### Creating a session

- [init(keySystem:storageDirectoryAt:)](avfoundation/avcontentkeysession/init(keysystem:storagedirectoryat:).md)
