<!--
{
  "availability" : [
    "iOS: 10.3.0 -",
    "iPadOS: 10.3.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.4 -",
    "tvOS: 10.2.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVContentKeySessionDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(pl)AVContentKeySessionDelegate"
  },
  "title" : "AVContentKeySessionDelegate"
}
-->

# AVContentKeySessionDelegate

A protocol that handles content key requests.

```
protocol AVContentKeySessionDelegate : NSObjectProtocol, Sendable
```

## Topics

### Providing new content key requests

[`contentKeySession(_:didProvide:)`](/documentation/AVFoundation/AVContentKeySessionDelegate/contentKeySession(_:didProvide:)-3coq5)

Provides the receiver with a new content key request object.

[`contentKeySession(_:didProvideRenewingContentKeyRequest:)`](/documentation/AVFoundation/AVContentKeySessionDelegate/contentKeySession(_:didProvideRenewingContentKeyRequest:))

Provides the receiver with a new content key request object for the renewal of an existing content key.

[`contentKeySession(_:didProvide:)`](/documentation/AVFoundation/AVContentKeySessionDelegate/contentKeySession(_:didProvide:)-2wdgz)

Provides the receiver with a new content key request object to process a persistable content key.

### Updating and retrying content key requests

[`contentKeySession(_:didProvide:forInitializationData:)`](/documentation/AVFoundation/AVContentKeySessionDelegate/contentKeySession(_:didProvide:forInitializationData:))

[`contentKeySession(_:externalProtectionStatusDidChangeFor:)`](/documentation/AVFoundation/AVContentKeySessionDelegate/contentKeySession(_:externalProtectionStatusDidChangeFor:))

Tells the delegate when external protection state has changed.

[`contentKeySession(_:didUpdatePersistableContentKey:forContentKeyIdentifier:)`](/documentation/AVFoundation/AVContentKeySessionDelegate/contentKeySession(_:didUpdatePersistableContentKey:forContentKeyIdentifier:))

Provides the receiver with an updated persistable content key for a specific key request.

[`contentKeySession(_:shouldRetry:reason:)`](/documentation/AVFoundation/AVContentKeySessionDelegate/contentKeySession(_:shouldRetry:reason:))

Provides the receiver with a content key request object to retry.

[`AVContentKeyRequest.RetryReason`](/documentation/AVFoundation/AVContentKeyRequest/RetryReason)

The reason for asking the client to retry a content key request.

[`contentKeySessionContentProtectionSessionIdentifierDidChange(_:)`](/documentation/AVFoundation/AVContentKeySessionDelegate/contentKeySessionContentProtectionSessionIdentifierDidChange(_:))

Tells the receiver the content protection session identifier changed.

[`contentKeySession(_:contentKeyRequest:didFailWithError:)`](/documentation/AVFoundation/AVContentKeySessionDelegate/contentKeySession(_:contentKeyRequest:didFailWithError:))

Tells the receiver that the content key request failed.

[`contentKeySession(_:contentKeyRequestDidSucceed:)`](/documentation/AVFoundation/AVContentKeySessionDelegate/contentKeySession(_:contentKeyRequestDidSucceed:))

Tells the content key session that the response to a content key requeset was successfully processed.

[`contentKeySessionDidGenerateExpiredSessionReport(_:)`](/documentation/AVFoundation/AVContentKeySessionDelegate/contentKeySessionDidGenerateExpiredSessionReport(_:))

Notifies the sender that an expired session report has been generated.



---

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)