> ## Documentation Index
> Fetch the complete documentation index at: https://developer.onetrust.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Download the SDK

## Download Options

1. [Download from Cocoapods](#download-from-cocoapods) (SDK framework only, no Demo App)
2. [Download from Swift Package Manager](#download-from-swift-package-manager) (SDK framework only, no Demo App)
3. [Download from OneTrust Tenant](#download-from-onetrust-tenant) (includes Demo App)

## Download from Cocoapods

> **Recommendation:** The OneTrust team recommends keeping your Cocoapods version within the last 2 versions. If you experience any issue downloading and running the Cocoapods frameworks, please look to check or upgrade this version first.

1. Navigate to <a href="https://cocoapods.org/" target="_blank">Cocoapods</a> and search `OneTrust-CMP` to identify the SDK framework you wish to download.

2. Add the pod reference to your podfile:

```swift
// replace version # with latest SDK version
pod 'OneTrust-CMP-XCFramework', '~> 202503.1.0.0'

pod 'OneTrust-CMP-tvOS-XCFramework', '~> 202503.1.0.0'
```

3. Run `pod install` in your project directory.
4. Open `App.xcworkspace` and build.

## Download from Swift Package Manager

* If the application target had been using .framework or .xcframework, delete any existence of .framework/.xcframework and all of its references from Target's Build or General Settings before adopting Swift Package.
* Delete the existing OTPublishersHeadlessSDK.framework / OTPublishersHeadlessSDK.xcframework from Application Target.
* Remove OTPublishersHeadlessSDK.framework / OTPublishersHeadlessSDK.xcframework from "Embedded Frameworks" and to "Link Binary With Libraries" under Application Target's Build Phases Tab if not automatically removed.

1. Open the Application project or workspace.
2. Select **File > Add Packages...**, which opens the **Swift Packages** screen.
3. Search for **Swift Packages** in the **Swift Packages** modal.
4. Enter the URL for the corresponding Swift package you want to integrate and press `ENTER`.

* If you want to integrate the iOS OT SDK via SPM, enter the Github public URL: [<\<https://github.com/Zentrust/OTPublishersHeadlessSDK>>](https://github.com/Zentrust/OTPublishersHeadlessSDK) for iOS.
* If you want to integrate the tvOS OT SDK via SPM, enter the Github public URL: [<\<https://github.com/Zentrust/OTPublishersHeadlessSDKtvOS>>](https://github.com/Zentrust/OTPublishersHeadlessSDKtvOS) for tvOS.

5. Select the Swift package in the middle section of the modal. On the right side, you will be prompted to decide on the **Dependency Rule** and the **Project**.
6. Choose the **Dependency Rule** that is appropriate for your project.
7. Choose the **Project** to which your application target belongs.
8. Click on the bottom-right of the pop-up to see that the **Add Package** button is now enabled.
9. Click on the button to begin resolving the Swift package. While resolving the Swift package, you will be prompted with the Choose Package Product modal, where you will need to select the **Target** to which the **Swift Package Product** should be added to.
10. Select the appropriate **Target**. Once the target as been selected, the **Swift Package Product** will be added to that **Target**.

> Note: All the above-mentioned steps are only required to be done once whenever the Application target is being linked with OT SDK Swift Package. After this is done, during the next releases, the application can directly fetch the latest OT SDK Swift Package by going to File -> Packages -> Update to Latest Package Version.

## Download from OneTrust Tenant

1. Navigate to **Mobile App Consent** > **SDKs**.
2. Select the application from the list. If you do not see any applications, navigate to **Mobile Apps** and create a new one.
3. Select the **SDK** tab.
4. Select your SDK Implementation. For example, **Native SDK**.
5. Select **Download SDK**.

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/d0acfd4871f2cf207b32e942df01528e49a3951c12d6e8213591950f330762a0-image.png",
        null,
        ""
      ],
      "align": "center",
      "border": true
    }
  ]
}
[/block]

<br />

## What's in the Download Package?

[block:parameters]
{
  "data": {
    "h-0": "Folder Structure",
    "h-1": "File/Folder Name",
    "h-2": "Description",
    "0-0": "OTPublishersNativeApp",
    "0-1": "OTPublishersNativeApp.xcodeproj",
    "0-2": "As of 202503.2.0 , we ship .xcframework generated out of  Xcode_14.1 and Xcode_15.2 for both tvOS and iOS.",
    "1-0": "OTPublishersHeadlessSDK-XCFramework",
    "1-1": "OTPublishersHeadlessSDK.xcframework",
    "1-2": "XCFramework ensures forward compatibility with versions after XCode 11.1.  \nThis also automatically removes the simulator architectures when users are ready for production without having to manually switch between \"testing\" and \"release ready\" frameworks."
  },
  "cols": 3,
  "rows": 2,
  "align": [
    null,
    null,
    null
  ]
}
[/block]

<br />

## Why is XCFramework recommended?

We recommend XCframework because Apple recommends it.  They introduced the XCFramework feature in WWDC19 and XCode 11.

For more information, consider watching the <a href="https://developer.apple.com/videos/play/wwdc2019/416/" target="_blank">Tech Talk from WWDC19</a>.