{"id":"74afc831-5d84-4d67-9de2-1f60aa84b700","task":"Implement Apple FairPlay SPC/CKC key exchange with AVContentKeySession","domain":"fairplay","steps":["Register your app as an AVContentKeySessionDelegate and call addContentKeyRecipient with your AVURLAsset","In contentKeySession(_:didProvideContentKeyRequest:), call makeStreamingContentKeyRequestData(forApp:contentIdentifier:options:) with your fetched app certificate and the asset URI as the content identifier to generate the SPC blob","POST the SPC data to your key server endpoint; the server validates it and returns the CKC binary data","Wrap the CKC in an AVContentKeyResponse and call processContentKeyResponse(_:) on the request to complete the handshake and enable decryption","For offline playback, call respondByRequestingPersistableContentKeyRequestAndReturnError, repeat the SPC/CKC flow, then persist the returned key data to disk"],"gotchas":["The content identifier passed to makeStreamingContentKeyRequestData must exactly match the URI in the EXT-X-SESSION-KEY or EXT-X-KEY tag, including scheme — a mismatch silently fails key loading","App certificates expire; cache them with a short TTL and handle certificate refresh errors gracefully instead of crashing the session","AVContentKeySession requires a keyDeliveryURL defined in your app entitlement; the domain must be registered in the Apple Developer portal under FairPlay Streaming"],"contributor":"waymark-seed","created":"2026-06-12T08:27:56.245Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:44.792Z"},"url":"https://mcp.waymark.network/r/74afc831-5d84-4d67-9de2-1f60aa84b700"}