.jpg?sv=2026-02-06&spr=https&st=2026-12-04T04%3A32%3A13Z&se=2026-12-04T04%3A52%3A13Z&sr=b&sp=r&sig=tgrwuJ2kt2igwbvafVKZzdk9ae%2FkSS54YwvuydHGkhw%3D)
The first step on the technical implementation side is to import the necessary SDK module(s) into your project.
Before you begin, it’s important to learn the following detail about the App SDK architecture: it includes the following two components:
UsercentricsCore: Contains all core functionality to collect, document and manage consent. If you want to build your own banner UI, that’s the only module you need.
UsercentricsUI: This component builds on the top of UsercentricsCore to provide a pre-built consent banner solution. Use it for a quick but still customizable solution. If you want to use this component, you must import UsercentricsCore as well.
The following sections show how to import the necessary modules under the different environments: iOS, Android, Flutter, React Native, Unity.
iOS
Prerequisite
iOS 11 or higher
CocoaPods
Install CocoaPods and follow the CocoaPods documentation to set up your project.
On your Podfile, add the following line to include both UsercentricsCore and UsercentricsUI:
platform :ios, '11.0' use_frameworks! pod 'UsercentricsUI'
Alternatively, add the following to include only UsercentricsCore:platform :ios, '11.0' use_frameworks! pod 'Usercentrics'On the root directory of your project, run the following command to install the pod:
pod installOpen your .xcworkspace file.
🚀 You are now ready to start integrating Usercentrics.
Swift Package Manager (SPM)
From Xcode 11 and above, you can use Swift Package Manager to install the SDK.
On Xcode, select File - Swift Packages - Add Package Dependency.
Enter the package repository URLs.
For Usercentrics UI: https://bitbucket.org/usercentricscode/usercentrics-spm-ui
For UsercentricsCore: https://bitbucket.org/usercentricscode/usercentrics-spm-sdk
Select the version you would like to use. We recommend sticking to "Up to Next Major" with the latest release as minor version.
🚀 You are now ready to start integrating Usercentrics.
Manually
Download and unzip the latest version of our SDKs:
UsercentricsUI. Download the zip file containing 'Manual-Linking' in its name.
Drag and drop .xcframework files to your Xcode project.
🚀 You are now ready to start integrating Usercentrics.
Android
Prerequisite
Android 7.0 (API 24) or higher
Android minimum SDK version
Support for versions lower than Android 5.0 (API Level 20) is planned to be removed in releases starting from April/24
Gradle
If not present, add Maven Central repository URL to your top-level build.gradle file:
allprojects { repositories { mavenCentral() } }Add the dependency to your app's build.gradle to include both UsercentricsCore and Usercentrics UI:
dependencies { implementation "com.usercentrics.sdk:usercentrics-ui" }Alternatively, add the following to include only UsercentricsCore:
dependencies { implementation "com.usercentrics.sdk:usercentrics" }
🚀 You are now ready to start integrating Usercentrics.
Manually
Download and the latest version of our SDKs: Usercentrics Core and Usercentrics UI.
Check the POM file is available in both links above. They may contain other libraries to be downloaded, download them if they are not present already in your environment.,
If the dependencies are handled manually, move all .aar and .jar files to your project, if not, upload them to your Nexus solution.
🚀 You are now ready to start integrating Usercentrics.
Flutter
Prerequisites
Android 7.0 (API 24) or higher with Kotlin 1.9 or higher
iOS 11 or higher
Dart 2.12 or higher
Flutter 1.20 or higher
Android minimum SDK version
Support for versions lower than Android 5.0 (API Level 20) is planned to be removed in releases starting from April/24
Android with Kotlin version < 1.7
If you have an incompatible Kotlin version, you may see the following error when you run app on Android:
e: Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors
To solve this error, increase the version that is usually in the android/build.gradle file. Use a recent stable Kotlin version, for example: 1.5.31..png?sv=2026-02-06&spr=https&st=2026-12-04T04%3A32%3A13Z&se=2026-12-04T04%3A52%3A13Z&sr=b&sp=r&sig=%2B4pYv5HfEKeFh%2Bk4Oa52ikYYUn0yD48iK5z4nhJix8s%3D)
After this, proceed with the installation described in the Pub.dev section below.
Android version < 5.0 (API 21) and Usercentrics version < 2.13.0
If you support an Android version lower than 5.0 (API 21) and you don't have the multidex enabled in your project, you may see the following error when you run your app on Android:
D8: Cannot fit requested classes in a single dex file (# methods: 66055 > 65536)
You can change the minimum version of your application to 5.0 (API 21). That configuration is usually in the android/app/build.gradle file. Make sure that minSdkVersion is 21 or higher.
.png?sv=2026-02-06&spr=https&st=2026-12-04T04%3A32%3A13Z&se=2026-12-04T04%3A52%3A13Z&sr=b&sp=r&sig=KS%2BWXT7NQb2DwMoXXp36ZY03rWkaDOy%2FnlGwZmg%2BOLQ%3D)
Although Android 5.0 version already supports 99% of all devices, if you still want to have support for Android 4.1 (API 16) you have to do the following:
Add the multidex library to your application dependencies that is usually in the
android/app/build.gradlefile.implementation "androidx.multidex:multidex:2.0.1".png?sv=2026-02-06&spr=https&st=2026-12-04T04%3A32%3A13Z&se=2026-12-04T04%3A52%3A13Z&sr=b&sp=r&sig=EYhfc2rKLieRNtBxA%2FTm%2B7bfO5uVfdIHeRS%2BOLER5xw%3D)
Enable the option in the application build
defaultConfig. It is usually in the sameandroid/app/build.gradlefile.multiDexEnabled true.png?sv=2026-02-06&spr=https&st=2026-12-04T04%3A32%3A13Z&se=2026-12-04T04%3A52%3A13Z&sr=b&sp=r&sig=N5FB3N6iCB0zoLMpe3kuHwhmyk3iXtGfUFuZXCL9wSg%3D)
Make your application class initialize multidex. There are several options to do that, in Flutter the easiest way is to add it to the manifest. The manifest is usually located at
android/app/src/main/AndroidManifest.xml.android:name="androidx.multidex.MultiDexApplication".png?sv=2026-02-06&spr=https&st=2026-12-04T04%3A32%3A13Z&se=2026-12-04T04%3A52%3A13Z&sr=b&sp=r&sig=PvjjUV4B28B9%2B5PGTEW0cy7nLozf4tiQMfiwFPEpW94%3D)
After this, proceed with the installation described in the Pub.dev section below.
Android minimum SDK version
Support for versions lower than Android 5.0 (API Level 20) is planned to be removed in releases starting from April/24
iOS version < 11
If you have a iOS target version lower than 11 or you have no version at all (it defaults to version 9) you may see the following error when you run your app on iOS:
[!] Automatically assigning platform iOS with version 9.0 on target Runner because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform.
To solve this error, follow these steps:
Define or increase the version of your Podfile at least to version 11. It is usually located at
ios/Podfile.platform :ios, '11.0'.png?sv=2026-02-06&spr=https&st=2026-12-04T04%3A32%3A13Z&se=2026-12-04T04%3A52%3A13Z&sr=b&sp=r&sig=Q3KIFkLQ2mmYZ7QAialyQV85VZ1Z9pkKNs4tmhNv60s%3D)
Run
flutter pub getagain and open the iOS project using Xcode. It is usually located atios/Runner.xcworkspace. Now, you have to select theRunnerproject and change theDeployment Targetto the same version..png?sv=2026-02-06&spr=https&st=2026-12-04T04%3A32%3A13Z&se=2026-12-04T04%3A52%3A13Z&sr=b&sp=r&sig=rTV%2BdgGTWQNQRFmoksOpFytBuvs1J5GdvL%2B%2FaRUvE%2Fs%3D)
After this, proceed with the installation described in the Pub.dev section below.
Pub.dev
To install the SDK, add Usercentrics to your project via pub.dev:
flutter pub add usercentrics_sdk🚀 You are now ready to start integrating Usercentrics.
iOS build system
The plugin supports both CocoaPods and Swift Package Manager (SPM) for its iOS dependencies — no extra setup is required for either. If your project has SPM enabled, run:
flutter config --enable-swift-package-managerbefore flutter pub get, and Flutter resolves the plugin's iOS dependencies via SPM instead of CocoaPods. Existing CocoaPods-based projects continue to work unchanged.
React Native
Prerequisites
Android 7.0 (API 24) or higher with Kotlin 1.9 or higher
iOS 11 or higher
React Native 0.74.3 or higher (with Fabric support)
React 18.2 or higher (React 19 supported)
npm
To install the SDK, add Usercentrics to your project using npm:
npm i @usercentrics/react-native-sdk🚀 You are now ready to start integrating Usercentrics.
Unity
The Usercentrics Unity SDK ships through two channels. Both are fully supported, both are built from the same sources, and both share the same asset GUIDs.
Channel | Artifact | iOS linkage |
|---|---|---|
| Dynamic frameworks | |
| Static frameworks | |
| Dynamic frameworks | |
| Static frameworks |
Already using the .unitypackage?
The
.unitypackageis not deprecated and ships with every release — you do not have to migrate. If you want Package Manager to handle versioning for you, see Unity: Migrate to the Unity Package Manager.
Install exactly one Usercentrics SDK
Never the
.unitypackagetogether with a Package Manager package, and never both Package Manager packages. They share asset GUIDs, so Unity silently ignores one of them — or both — and the SDK may not load at all.
Static Linkage Support for iOS
Because we use ExternalDependencyManager, the project output when building for iOS, will be a CocoaPods workspace, which offers an option to Link frameworks statically. If you need support for Static Linkage on iOS, use the static variant: the package
com.usercentrics.sdk.static, or the download with the-staticsuffix. *e.g.Usercentrics-2.X.X-static.unitypackage.The static variant needs Unity 2019.3 or newer for iOS builds, because it relies on the UnityFramework target that Unity only exports from 2019.3. Android builds are not affected.
Manual Linkage Support for iOS
In iOS, you have the flexibility to manually link frameworks when building your iOS applications, for instance, if you are using CMake for cross-platform development. If you need support for Manual Linkage, please download the latest version of the zip files:
UsercentricsUI, containing the 'Manual-Linking' suffix. Please note if you need the
-staticversion as well.
Installation on Unity IDE
Prerequisites
Android 5.0 (API 21), or higher, for the Minimum API Level and Android 12 (API 31) for the Target API Level
Java version 8 or 11 depending on the Unity Version
Kotlin 1.7 or higher
iOS 11 or higher
Unity 2018.4 or newer. Scoped registries need Unity 2019.1 or newer — on 2018.4, install the Package Manager package from a tarball as described below.
Version 2.36.0 or newer for the Package Manager packages. Earlier versions are only available as .unitypackage.
Install with Package Manager BETA
BETA Installing with Package Manager is in Beta. The Package Manager packages are available from version 2.36.0, the first release published to the npm registry. The package layout and the installation steps may change in a later release. The .unitypackage remains fully supported. If you run into a problem, please open a ticket with Usercentrics support.
Install the External Dependency Manager (EDM4U). Unlike the
.unitypackage, the Package Manager packages do not bundle it, and the SDK needs it to pull its native Android and iOS dependencies.Add the scoped registry and the dependency to
Packages/manifest.json:{ "scopedRegistries": [ { "name": "Usercentrics", "url": "https://registry.npmjs.org", "scopes": [ "com.usercentrics" ] } ], "dependencies": { "com.usercentrics.sdk": "2.36.0" } }For static linkage on iOS, use
com.usercentrics.sdk.staticinstead. One or the other, never both.Let Unity import the package. You can confirm it under Window - Package Manager.
Resolve the native dependencies: Assets - External Dependency Manager - Android Resolver - Force Resolve.
The first Force Resolve can fail
On a project that has no
Assets/Plugins/Androidfolder yet, the first Force Resolve fails with "Unable to copy 'mainTemplate.gradle'" and resolves nothing. This is an EDM4U behaviour, not a Usercentrics one. The failed attempt creates the folder, so run Force Resolve a second time.
Installing without a registry, or on Unity 2018.4
Scoped registries start at Unity 2019.1, and some projects cannot reach a registry at all. Download the tarball from the npm registry. The links below are for 2.36.0; for another version, replace 2.36.0 in the URL with the version you want (2.36.0 or newer):
https://registry.npmjs.org/com.usercentrics.sdk/-/com.usercentrics.sdk-2.36.0.tgz
https://registry.npmjs.org/com.usercentrics.sdk.static/-/com.usercentrics.sdk.static-2.36.0.tgz
With Node.js installed, npm pack com.usercentrics.sdk@2.36.0 downloads the same file. Place the tarball inside your project, and reference it by path instead:
"dependencies": {
"com.usercentrics.sdk": "file:../LocalPackages/com.usercentrics.sdk-2.36.0.tgz"
}For the static package, use com.usercentrics.sdk.static as the dependency name and its tarball's filename.
Everything else is identical. Updating means downloading a new tarball and changing the filename.
Install with the .unitypackage
Drag and drop
Usercentrics.unitypackageinto your Unity project. Alternatively, you can select the package from the menu Assets - Import Package - Custom Package.
If you have already imported ExternalDependencyManager for Unity in your project, you can deselect it in the pop-up, to keep your previous configuration.
Click Import.
Add the prefab to your Scene
This step is the same for both installation methods.
Drag the Usercentrics prefab into your scene. This will represent the game object for the banner. With the .unitypackage the prefab is at Assets/Usercentrics/Prefabs; with the Package Manager package it is at Packages/com.usercentrics.sdk/Prefabs.
The name of this object needs to be Usercentrics
The native SDK delivers its callbacks to a GameObject with that exact name. If you rename it, the SDK initialises natively and then goes quiet:
IsInitializedstays false, the banner never appears, and nothing is written to the log.
You are now ready to start integrating Usercentrics.
Troubleshooting
This section gives you some pointers on how to troubleshoot isses.
Unity Editor is NOT Supported
The Unity Editor is not supported. To test and debug the CMP you will need to run the project on a simulator or real device.
Troubleshooting an iOS setup
Cocoapods must be installed for iOS builds to work. Check their installation guide.
When opening the project built by Unity, you should always select the .xcworkspace file created by Cocoapods.
Troubleshooting an Android setup
Dependencies
When Android is selected as build platform, the dependency manager will ask you to download the dependencies that Usercentrics needs. We recommend enabling Android Auto-resolution to handle this. Make sure you have downloaded all Android Build Support Modules including OpenJDK.
Internet access
The Usercentrics SDK needs internet in order to initialize. Make sure you enable a required connection in your Android Player Settings.
You can do so under File - Build Settings - Android (selected) - Player Settings - Other Settings - Internet Access - Required.
ExternalDependencyManager and building
When using this plugin for the first time, a popup will appear asking if you want to enable Android Auto-resolution. We highly recommend to enable it, since it's natural for some Android libraries have conflicting dependencies. Auto-resolution can handle those conflicts for you.
.png?sv=2026-02-06&spr=https&st=2026-12-04T04%3A32%3A13Z&se=2026-12-04T04%3A52%3A13Z&sr=b&sp=r&sig=QBqPW20f9%2B2dKmeZ71yR58JRtYOCb%2BSPeEprr3yqek4%3D)
Dependency conflicts (Duplicate classes) or ExternalDependencyManager fails to resolve dependencies
If the auto-resolution process fails to resolve any conflicts, modify your project's build configuration for Android. By doing so, you will not depend solely on the ExternalDependencyManager to download all dependencies. Instead, you allow Gradle to handle the resolution of dependencies and any emerging conflicts.
To do that, follow these steps:
Go to File - Build Settings - Switch platform to Android,
Go to Player Settings.
Scroll to the last section Publishing Settings.
Enable Custom Main Gradle Template.
Enable Custom Gradle Properties File.
Save & close.
Go to Assets - External Dependency Manager - Android Resolver - Settings.
Make sure Patch mainTemplate.gradle and Patch gradleTemplate.properties are both enabled.