<!--
{
  "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/contentKeySession(_:shouldRetry:reason:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(pl)AVContentKeySessionDelegate(im)contentKeySession:shouldRetryContentKeyRequest:reason:"
  },
  "title" : "contentKeySession(_:shouldRetry:reason:)"
}
-->

# contentKeySession(_:shouldRetry:reason:)

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

```
optional func contentKeySession(_ session: AVContentKeySession, shouldRetry keyRequest: AVContentKeyRequest, reason retryReason: AVContentKeyRequest.RetryReason) -> Bool
```

## Parameters

`session`

The content key session that is providing the content key request.

`keyRequest`

The key request to be retried.

`retryReason`

The reason for the retry request.

## 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)