---
updatedAt: 2026-02-04T10:19:34.000Z
agentTools:
  siteIndex: https://developer.bitmovin.com/llms.txt
  projectIndex: https://developer.bitmovin.com/playback/llms.txt
---

# Playing EZDRM protected content with the iOS Player SDK

```swift Swift
let fpsConfig = FairplayConfiguration(license: licenseUrl, certificateURL: certificateUrl)

fpsConfig.licenseRequestHeaders = ["content-type": "application/octet-stream"]

fpsConfig.prepareContentId = { (contentId: String) -> String in
    let part1 = contentId.components(separatedBy: ";")[1]
    let part2 = part1.components(separatedBy: "?")[0]
    return part2
}

fpsConfig.prepareMessage = { (data: Data, contentId: String) -> Data in
    return data
}

psConfig.prepareLicense = { (data: Data) -> Data in
    return data
}
```

# Initialize a FairplayConfiguration object

<!-- swift@1 -->

Initialize a FairplayConfiguration object by passing the appropriate license and certificate URLs.

# Set the HTTP request headers

<!-- swift@3 -->

Set the 'content-type' header for the lincense request.

# Provide the required callbacks

<!-- swift@5-17 -->

Set up the 'prepareContentId', 'prepareMessage' and 'prepareLicense' callbacks.