Download the SDK

Download Options

Once you've published the SDK, you can download the package for Xamarin apps from the OneTrust application. This package contains a number of files you will need to extract in order to demo, test, and implement the SDK.

Download the Xamarin SDK from the OneTrust Tenant

  1. Navigate to Mobile App Compliance > Integration > SDKs tab.
  2. Select an Application from the list.
  3. Select the SDK tab.
  4. Select Xamarin SDK
  5. Select the Download SDK button.

What's in the Download Package?

FolderContents
OneTrust_CMP_Xamarin_DLLThe DLL files to be imported into your project
Xamarin-FormsThe iOS, Android, and UWP files to be imported into your project if you are using Xamarin.forms UI framework. A sample project to reference as you integrate the OneTrust CMP with your application is also included here.
Xamarin-Forms-With-UIThis folder contains the implementation of the Xamarin DLL with an HTML based user interface.
Xamarin-NativeThe iOS, Android, and UWP files to be imported into your project if you are using Xamarin.native UI framework. A sample project to reference as you integrate the OneTrust CMP with your application is also included here.
Xamarin-Native-With-UIThis folder contains the implementation of the Xamarin DLL with an HTML based user interface.
ApplePrivacyManifestContains the Apple privacy manifest file
DotNet7This folder contains the DotNet7 sample apps and DLL. It contains three folders, DotNet7-Native-With-UI, MAUI-With-UI, and OneTrust_CMP_DotNet7_DLL.

Note: Xamarin-Forms, Xamarin-Forms-With-UI, Xamarin-Native, and Xamarin-Native-With-UI are all Sample Projects to test and familiarize yourself with.

OneTrust_CMP_Xamarin_DLL includes the SDK's business logic and is used by all 3 sample projects.


Note: DotNet7-Native-With-UIand MAUI-With-UI, are Sample Projects to test and familiarize yourself with.

OneTrust_CMP_DotNet7_DLL includes the SDK's business logic and is used by both MAUI sample projects.


Apple Privacy Manifest

To add the manifest file to your app, follow these steps:

Xamarin.Forms/Xamarin.iOS

  1. Copy the PrivacyInfo.xcprivacy file to the root folder of your Xamarin.iOS project.
  2. Open the Xamarin.iOS csproj file and edit it.
  3. Locate the that contains other elements and add the following element: <BundleResource Include="PrivacyInfo.xcprivacy" LogicalName="PrivacyInfo.xcprivacy" />. This will package the file into the iOS app at the root of the bundle.

.Net MAUI

  1. Copy the PrivacyInfo.xcprivacy file to the Platforms/iOS folder in your .NET MAUI project.
  2. Open the .NET MAUI csproj project file and edit it.
  3. Add the following elements to the bottom of the root element: <ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'"> <BundleResource Include="Platforms\iOS\PrivacyInfo.xcprivacy" LogicalName="PrivacyInfo.xcprivacy" /> </ItemGroup>. This will package the file into the iOS app at the root of the bundle.

Note: Once added to your project, the PrivacyInfo.xcprivacy file will need to be updated if there are any additional API usages from additional categories or additional reasons for usage.

Download the Unity SDK from the OneTrust Tenant

  1. Navigate to Mobile App Compliance > Integration > SDKs tab.
  2. Select an Application from the list.
  3. Select the SDK tab.
  4. Select Unity SDK
  5. Select the Download SDK button.

What's in the Download Package?

File Name
OTSDK_Unity2020LTS.unitypackage
OTSDK_Unity2021LTS.unitypackage