Sample App
Overview
Once you've downloaded the Native SDK scripts from the OneTrust application, you can begin testing in a demo application simulator using the files in the SDK package. For more information on how to publish SDKs, see Publishing the Mobile App Consent SDKs.
To open the SDK files
-
Extract the .zip file downloaded from Admin UI. Folder hierarchy will look like screenshot attached below:
-
Move OTPublishersHeadlessSDK.xcframework inside OTPublishersNativeApp like showing in screenshot below:
-
Open the OTPublishersNativeApp > OTPublishersNativeApp > OTPublishersNatieApp.xcodeProj file.
-
Select an iOS device target and then click Run.
- Wait for Simulator to load then navigate to the Settings view.
- Complete the fields, as follows:
Field | Description |
---|---|
Domain URL | Enter the Domain URL for your environment. For more information, see Environment Domain URL Reference. |
Domain ID | Enter the Application ID for the SDK found on the Implementation screen. |
Language | Enter your two-letter ISO language code. en for English |
Country Code | Optional two-letter ISO country code. US for United States or FR for France, etc. |
Region Code | Optional two-letter ISO region code most commonly used for US states like CA for California. |
Data Subject Identifier | Optional data subject identifier value for storing a user's consent profile in OneTrust for metrics, reporting, audit, and cross device profile syncing. |
Domain URL by Environment
The value of the Domain URL field is determined based on your tenant's environment. Use the following table to identify the correct value.
Environment | Domain URL to Use |
---|---|
training0.onetrust.com | otcc-training.onetrust.com |
training1.onetrust.com | otcc-training.onetrust.com |
demo0.otprivacy.com | otcc-demo.otprivacy.com |
demo1.otprivacy.com | otcc-demo.otprivacy.com |
demo2.otprivacy.com | otcc-demo.otprivacy.com |
app.cookiepro.com | cookie-cdn.cookiepro.com |
app-uk.onetrust.com | cdn-ukwest.onetrust.com |
app-au.onetrust.com | cdn-au.onetrust.com |
app-apac.onetrust.com | cdn-apac.onetrust.com |
app.onetrust.com | cdn.cookielaw.org |
app-de.onetrust.com | cdn.cookielaw.org |
app-eu.onetrust.com | cdn.cookielaw.org |
free.onetrust.com | cdn.cookielaw.org |
trial.onetrust.com | cdn.cookielaw.org |
uat.onetrust.com | cdn.cookielaw.org |
uat-de.onetrust.com | cdn.cookielaw.org |
Language Support
Translated language text depends on your Template's settings managed on the OneTrust tenant. OneTrust provides default template text that is pre-transla ted across many languages. When you change the default template text, you will also need to setup the languages you wish to support and the translation text you wish to show. Otherwise, English text will be provided regardless of the Language code provided.
-
Click the Download SDK Data button. The SDK data will download to the demo application.
-
By returning to the Home screen, you can then select Show Banner or Show Preference Center to see how the Native SDK will display consent preferences for the application.
Updated about 1 month ago