---
title: "contentKeySession(_:didUpdatePersistableContentKey:forContentKeyIdentifier:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avcontentkeysessiondelegate/contentkeysession(_:didupdatepersistablecontentkey:forcontentkeyidentifier:)"
---

# contentKeySession(_:didUpdatePersistableContentKey:forContentKeyIdentifier:)

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

## Declaration

```swift
optional func contentKeySession(_ session: AVContentKeySession, didUpdatePersistableContentKey persistableContentKey: Data, forContentKeyIdentifier keyIdentifier: Any)
```

## Parameters

- `session`: The content key session that is providing the updated persistable content key.
- `persistableContentKey`: The updated persistent content key data. This data can be stored offline and used to answer future content key requests with the matching key identifier.
- `keyIdentifier`: A container- and protocol-specific identifier for the updated persistent content key.

## Discussion

Discussion If the content key session provides updated persistable content key data, previous key data is no longer valid and cannot be used to answer future loading requests.

## See Also

### Updating and retrying content key requests

- [contentKeySession(_:didProvide:forInitializationData:)](avfoundation/avcontentkeysessiondelegate/contentkeysession(_:didprovide:forinitializationdata:).md)
- [contentKeySession(_:externalProtectionStatusDidChangeFor:)](avfoundation/avcontentkeysessiondelegate/contentkeysession(_:externalprotectionstatusdidchangefor:).md)
- [contentKeySession(_:shouldRetry:reason:)](avfoundation/avcontentkeysessiondelegate/contentkeysession(_:shouldretry:reason:).md)
- [AVContentKeyRequest.RetryReason](avfoundation/avcontentkeyrequest/retryreason.md)
- [contentKeySessionContentProtectionSessionIdentifierDidChange(_:)](avfoundation/avcontentkeysessiondelegate/contentkeysessioncontentprotectionsessionidentifierdidchange(_:).md)
- [contentKeySession(_:contentKeyRequest:didFailWithError:)](avfoundation/avcontentkeysessiondelegate/contentkeysession(_:contentkeyrequest:didfailwitherror:).md)
- [contentKeySession(_:contentKeyRequestDidSucceed:)](avfoundation/avcontentkeysessiondelegate/contentkeysession(_:contentkeyrequestdidsucceed:).md)
- [contentKeySessionDidGenerateExpiredSessionReport(_:)](avfoundation/avcontentkeysessiondelegate/contentkeysessiondidgenerateexpiredsessionreport(_:).md)
