<!--
{
  "availability" : [
    "iOS: 14.5.0 -",
    "iPadOS: 14.5.0 -",
    "macCatalyst: 14.5.0 -",
    "macOS: 11.3.0 -",
    "tvOS: 14.5.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVContentKeyRecipient/contentKeySession(_:didProvide:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(pl)AVContentKeyRecipient(im)contentKeySession:didProvideContentKey:"
  },
  "title" : "contentKeySession(_:didProvide:)"
}
-->

# contentKeySession(_:didProvide:)

Tells the recipient that a content key is available.

```
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>.

## Discussion

---

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)