<!--
{
  "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:didProvideContentKeyRequest:`](/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:didProvidePersistableContentKeyRequest:`](/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:didProvideContentKeyRequests:forInitializationData:`](/documentation/AVFoundation/AVContentKeySessionDelegate/contentKeySession(_:didProvide:forInitializationData:))

[`-  contentKeySession:externalProtectionStatusDidChangeForContentKey:`](/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:shouldRetryContentKeyRequest:reason:`](/documentation/AVFoundation/AVContentKeySessionDelegate/contentKeySession(_:shouldRetry:reason:))

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

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

## Relationships

### Inherits From

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Sendable`](/documentation/Swift/Sendable)

---

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)