Sample App
Overview
OneTrust offers a sample app where you can explore the SDK functionality and setup. To download it, follow the instructions below.
The sample app is optional.
Download the sample app
- Log in to your OneTrust tenant or admin console.
- Navigate to Mobile App Consent > Integration > SDKs > Your app > SDK.
- Select the framework you want to download (Native SDK, Unity SDK, MAUI SDK).
- Select the SDK version on the Select API Version field.
- Click the Download SDK button.
Access the demo app and configure the Xcode project
The steps below reference the iOS demo app. For tvOS, follow the same steps but instead of OTPublishersNativeApp, it will be OTPublishersNativeAppTvOS.
- From the .zip file downloaded above, select OTPublishersNativeApp.

- Open the OTPublishersNativeApp.xcworkspace file.
- Click on the top level project OTPublishersNativeApp and select OTPublishersNativeApp under Project.
- Click Package Dependencies.
- Under the OTPublishersHeadlessSDK package, click the dropdown under Dependency Rule and select Exact Version. For tvOS, the package name is OTPublishersHeadlessSDKtvOS.
- Specify the version of the OneTrust SDK you would like to download. This is usually the same as the SDK version you have published in the OneTrust tenant/admin console.
For more information on publishing SDK versions, see Publishing the SDK.

Run the app
- In the build target, select
OTPublishersNativeApp-SPM
. - Run the app.
- In the Settings page of the app that is launched, enter the CDN Location, Domain Id (App ID), and Language. Other parameters are optional.
- Click Download SDK Data to initialize the SDK.
- Click Home. You can now access and explore the SDK functionality.



Updated 1 day ago