---
title: "contentKeySession(_:externalProtectionStatusDidChangeFor:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avcontentkeysessiondelegate/contentkeysession(_:externalprotectionstatusdidchangefor:)"
---

# contentKeySession(_:externalProtectionStatusDidChangeFor:)

Tells the delegate when external protection state has changed.

## Declaration

```swift
optional func contentKeySession(_ session: AVContentKeySession, externalProtectionStatusDidChangeFor contentKey: AVContentKey)
```

## See Also

### Updating and retrying content key requests

- [contentKeySession(_:didProvide:forInitializationData:)](avfoundation/avcontentkeysessiondelegate/contentkeysession(_:didprovide:forinitializationdata:).md)
- [contentKeySession(_:didUpdatePersistableContentKey:forContentKeyIdentifier:)](avfoundation/avcontentkeysessiondelegate/contentkeysession(_:didupdatepersistablecontentkey:forcontentkeyidentifier:).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)
