---
title: "contentKeySession(_:didProvide:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avcontentkeyrecipient/contentkeysession(_:didprovide:)"
---

# contentKeySession(_:didProvide:)

Tells the recipient that a content key is available.

## Declaration

```swift
optional func contentKeySession(_ contentKeySession: AVContentKeySession, didProvide contentKey: AVContentKey)
```

## Parameters

- `contentKeySession`: The current content key session.
- `contentKey`: A content key to use with objects that support manual attachment of keys, such as doc://com.apple.documentation/documentation/CoreMedia/CMSampleBuffer.

## See Also

### Verifying decryption key requirements

- [mayRequireContentKeysForMediaDataProcessing](avfoundation/avcontentkeyrecipient/mayrequirecontentkeysformediadataprocessing.md)
