Download the SDK

Download Options

  1. Download from Cocoapods (SDK framework only, no Demo App)
  2. Download from Swift Package Manager (SDK framework only, no Demo App)
  3. 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 Cocoapods and search OneTrust-CMP to identify the SDK framework you wish to download.

  2. Add the pod reference to your podfile:

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

pod 'OneTrust-CMP-tvOS-XCFramework', '~> 202209.1.0.0'
  1. Run pod install in your project directory.
  2. 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.
  1. 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.
  2. Choose the Dependency Rule that is appropriate for your project.
  3. Choose the Project to which your application target belongs.
  4. Click on the bottom-right of the pop-up to see that the Add Package button is now enabled.
  5. 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.
  6. 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 Compliance > SDKs
  2. Select the Application from the list
  3. Select the SDK tab
  4. Select your SDK Implementation e.g. Native SDK
  5. Select Download SDK

What's in the Download Package?

Folder StructureFile/Folder NameDescription
OTPublishersNativeAppOTPublishersNativeApp.xcodeprojAs of the OneTrust 6.3 release, the default .framework is XCode 11.5.
In OneTrust 6.4, this will be changed to XCFramework as it is a more flexible framework and better suited for adoption.
BitcodeEnabledOTPublishersHeadlessSDK.frameworkUse when bitcodeEnabled "release ready" framework is necessary for XCode 11.5
BitcodeEnabled-TestOTPublishersHeadlessSDK.frameworkUse when bitcodeEnabled "testing" framework is necessary for XCode 11.5
BitcodeDisabledOTPublishersHeadlessSDK.frameworkUse when bitcodeDisabled "release ready" framework is necessary for XCode 11.5
OTPublishersHeadlessSDK-XCFrameworkOTPublishersHeadlessSDK.xcframeworkUse this as often as possible as the XCFramework ensures forward compatibility with versions after XCode 11.1.
This also automatically removes the simulator architectures when users are ready for production without having to manually switch between "testing" and "release ready" frameworks.

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 Tech Talk from WWDC19.