FairPlay is a proprietary DRM technology developed by Apple to protect video content in the iOS, tvOS, and macOS ecosystem. The system uses Secure Enclave and hardware encryption for secure key storage, allowing streaming services to deliver content in 4K HDR quality. According to Apple Developer documentation (2025), FairPlay Streaming is supported on all Apple devices with an A8 chip and newer.
Key Takeaways
FairPlay is a DRM technology created by Apple and built into the iOS, tvOS, iPadOS, and macOS operating systems to protect audio and video content from unauthorized use. Originally developed for iTunes and iPod, it has evolved into a full-fledged content protection system for streaming content via the FairPlay Streaming protocol.
Unlike other DRM solutions, FairPlay is fully integrated into the hardware architecture of Apple devices. Decryption keys are stored in the Secure Enclave — a protected coprocessor isolated from the main OS, making key extraction virtually impossible even with a jailbreak.
The history of FairPlay began in 2003 with the iTunes Store, where AAC file encryption was used with the proprietary M4P format. In 2009, Apple introduced FairPlay Streaming — a protocol for protecting HLS-based streaming video, which later became mandatory for Apple TV and iOS apps.
Starting with iOS 10 and tvOS 10, Apple opened FairPlay Streaming to third-party developers through the AVFoundation framework. Today, Netflix, Amazon Prime Video, and Disney+ use FairPlay to protect content on Apple devices up to 4K HDR resolution with Dolby Vision.
How FairPlay works is based on a three-stage process: content packaging, distribution via CDN, and decryption on the device. At the packaging stage, video is encrypted using AES-128 or AES-256, and the encryption keys are tied to a specific device through the Key Envelope mechanism.
When requesting content, the player initiates a FairPlay session through AVContentKeySession, which sends a request to the content provider’s license server. The server verifies access rights and returns the decryption key encrypted with the public key of the device certificate.
The client creates an instance of AVContentKeySession and adds the content track to it. The system generates an SPC (Server Playback Context) request, which contains the device identifier and the application certificate signed by Apple. This request is sent to the license server over HTTPS.
The license server validates the SPC, retrieves the content key from its database, and encrypts it with the device’s public key, forming a CKC (Content Key Context). The CKC is returned to the client, where AVContentKeySession decrypts it using the Secure Enclave’s private key.
let contentKeySession = AVContentKeySession(keySystem: .fairPlayStreaming)
contentKeySession.setDelegate(self, queue: .main)
let asset = AVURLAsset(url: streamURL)
asset.resourceLoader.setDelegate(self, queue: .main)
contentKeySession.addContentKeyRecipient(asset)
let playerItem = AVPlayerItem(asset: asset)
let player = AVPlayer(playerItem: playerItem)
FairPlay architecture includes several interconnected components: application certificate, Key Envelope, Secure Enclave, and content decryption module. Each component plays its role in the protection chain from the server to the user’s screen.
| Component | Function | Where It Runs |
|---|---|---|
| Application Certificate | Identifies the app to the license server | Stored in the app bundle |
| SPC | Server Playback Context — license request | Generated by AVContentKeySession |
| CKC | Content Key Context — response with key | Processed by Secure Enclave |
| Secure Enclave | Hardware key storage and decryption | Hardware coprocessor on SoC |
| Key Envelope | Key container with license metadata | Generated by license server |
To work with FairPlay, a developer must obtain an FPS certificate from Apple through the Apple Developer program. The certificate includes the public key of an asymmetric pair, the private part of which is used by Secure Enclave to decrypt the CKC.
The application certificate is added to the project bundle and automatically signed at build time through Xcode. On the first playback of protected content, the system verifies the certificate’s validity and requests a license.
Secure Enclave is a dedicated coprocessor on Apple A-series and M-series chips, running on the isolated L4 OS. It is responsible for generating and storing private keys, decrypting the CKC, and passing the content key to the video decryption module.
All cryptographic operations are performed exclusively inside the Secure Enclave, and keys never leave the protected area. Side-channel attacks on the data bus between the Secure Enclave and the main processor are blocked by hardware integrity monitoring.
FairPlay integration in iOS and tvOS apps is done through AVFoundation and requires implementing the AVContentKeySessionDelegate and AVAssetResourceLoaderDelegate protocols. The developer needs to handle four key events: receiving SPC, sending it to the server, receiving CKC, and passing it to the player.
func contentKeySession(
_ session: AVContentKeySession,
didProvide keyRequest: AVContentKeyRequest
) {
guard let identifier = keyRequest.identifier
else { return }
let spc: Data = keyRequest.makeStreamingContentKeyRequestData(
appCertificate: certificate,
contentIdentifier: identifier,
options: nil
)
licenseService.requestCKC(spc) { ckc in
keyRequest.processContentKeyResponse(
AVContentKeyResponse(fairPlayStreamingKeyResponseData: ckc)
)
}
}
Before starting playback, you need to load the application certificate from the bundle and prepare the content identifier (usually the stream URL or movie ID). The certificate must be valid for at least the duration of the content rental, otherwise licensing will fail.
The content identifier is passed to the licensing system at the SPC formation stage. The license server uses this identifier to find the corresponding key and playback policies, including time and device restrictions.
Errors can occur during licensing: certificate expiration, invalid content identifier, lack of user access rights. FairPlay errors are returned through the contentKeySession:didFailWithError delegate and must be handled with appropriate UI shown to the user.
Typical error codes include FP_NO_ENTITLEMENT when there is no subscription and FP_REQUEST_TIMEOUT for network issues. It is recommended to implement retry logic with exponential backoff for temporary network failures.
FairPlay Streaming is a protocol for protecting HLS-based streaming video that uses segment encryption and a time-limited key mechanism. The content provider deploys its own license server, which integrates with the user authentication system.
The license server receives an SPC request from the client, extracts the device and content identifiers, verifies the user’s rights in the backend, and forms a CKC response. The content key is encrypted with the device’s public key from the FPS certificate.
A FairPlay license may contain time restrictions (48-hour rental), device limits (maximum 5 authorized devices), and playback quality restrictions (limited to 1080p for a basic plan). Policies are set on the server side and packaged into the Key Envelope.
It is important to note that FairPlay policies are enforced at the Secure Enclave level and cannot be bypassed by software methods at the OS level. Even with a jailbreak, the hardware protection prevents key extraction or license parameter modification.
| Parameter | FairPlay | Widevine | PlayReady |
|---|---|---|---|
| Ecosystem | Apple (iOS, tvOS, macOS) | Google (Android, Chrome) | Microsoft (Windows, Xbox) |
| Maximum Quality | 4K HDR Dolby Vision | 4K UHD | 4K UHD |
| Hardware Protection | Secure Enclave | TEE | TPM + TEE |
| Developer Requirements | Apple FPS certificate | Not required | Microsoft license |
FairPlay Streaming support depends on the operating system version and device type. Since iOS 10 and tvOS 10, the AVContentKeySession API is available to all apps, but hardware acceleration through Secure Enclave is only required for 4K HDR content. On devices with A8–A10 chips, the maximum resolution is limited to 1080p.
In iOS 14, Apple added support for multiple FairPlay sessions, allowing an app to play several protected streams simultaneously — for example, picture-in-picture with different licenses. iOS 15 extended the protocol with background key renewal support for extended viewing sessions.
For cross-platform streaming services, FairPlay is used as part of a multi-DRM architecture alongside Widevine and PlayReady. License aggregators such as Axinom and EZDRM provide a unified API that translates requests into SPC format for FairPlay and MediaDrm format for Widevine, simplifying integration across all platforms.
Frequently Asked Questions
FairPlay is an Apple DRM technology built into iOS, tvOS, and macOS for protecting video content. It uses hardware encryption through Secure Enclave and the FairPlay Streaming protocol for secure transfer of decryption keys on Apple devices.
To obtain an FPS certificate, you need to register in the Apple Developer program, create a certificate in the Certificates, Identifiers & Profiles section, and download it in DER format. The certificate is added to the Xcode project bundle and signed at build time.
No, FairPlay is not available on Android, as it is a proprietary Apple technology tied to the Secure Enclave hardware architecture on A-series and M-series chips. Android devices use Widevine DRM from Google.
FairPlay is the overall name for Apple’s DRM technology, while FairPlay Streaming (FPS) is a specific protocol for protecting HLS streams. FPS uses FairPlay mechanisms for encrypting video segments and managing licenses through AVContentKeySession.
A FairPlay license can specify restrictions on viewing time, maximum video quality (720p, 1080p, 4K), number of devices, and key validity. All policies are enforced at the hardware level in Secure Enclave and cannot be bypassed.
Summary
We will develop a mobile application turnkey
IT Sectr creates iOS and Android applications for startups and businesses since 2017. We will advise you and propose the best solution.
Read also