Legacy installation guide
Adapty comprises two crucial SDKs for seamless integration into your mobile app:
- Core AdaptySDK: This is a fundamental, mandatory SDK necessary for the proper functioning of Adapty within your app.
- AdaptyUI SDK: This optional SDK becomes necessary if you use the Adapty Paywall Builder: a user-friendly, no-code tool for easily creating cross-platform paywalls. These paywalls are built in a visual constructor right in our dashboard, run entirely natively on the device, and require minimal effort from you to create something that performs well.
Please consult the compatibility table below to choose the correct pair of Adapty SDK and AdaptyUI SDK.
AdaptySDK-Unity version | AdaptyUI-Unity version |
---|---|
2.7.1 | 2.0.1 |
2.9.0 | not compatible |
Go through release checklist before releasing your app
Before releasing your application, make sure to carefully review the Release Checklist thoroughly. This checklist ensures that you've completed all necessary steps and provides criteria for evaluating the success of your integration.
Install Adapty SDKs
To install the Adapty SDKs:
- Download the
adapty-unity-plugin-*.unitypackage
from GitHub and import it into your project.

- Download the
adapty-ui-unity-plugin-*.unitypackage
from GitHub and import it into your project.

-
Download and import the External Dependency Manager plugin.
-
The SDK uses the "External Dependency Manager" plugin to handle iOS Cocoapods dependencies and Android gradle dependencies. After the installation, you may need to invoke the dependency manager:
Assets -> External Dependency Manager -> Android Resolver -> Force Resolve
and
Assets -> External Dependency Manager -> iOS Resolver -> Install Cocoapods
-
When building your Unity project for iOS, you would get
Unity-iPhone.xcworkspace
file, which you have to open instead ofUnity-iPhone.xcodeproj
, otherwise, Cocoapods dependencies won't be used.
Configure Adapty SDK
To configure the Adapty SDK for Unity, start by initializing the Adapty Unity Plugin and then using it as described in the guidance below. Additionally, ensure to set up your logging system to receive errors and other important information from Adapty.
Activate Adapty SDK
You only need to activate the Adapty SDK once, typically early in your app's lifecycle.
using AdaptySDK;
var builder = new AdaptyConfiguration.Builder("YOUR_API_KEY")
.SetCustomerUserId(null)
.SetObserverMode(false)
.SetServerCluster(AdaptyServerCluster.Default)
.SetIPAddressCollectionDisabled(false)
.SetIDFACollectionDisabled(false);
.SetActivateUI(true)
.SetAdaptyUIMediaCache(
100 * 1024 * 1024, // MemoryStorageTotalCostLimit 100MB
null, // MemoryStorageCountLimit
100 * 1024 * 1024 // DiskStorageSizeLimit 100MB
);
Adapty.Activate(builder.Build(), (error) => {
if (error != null) {
// handle the error
return;
}
});
Parameter | Presence | Description |
---|---|---|
apiKey | required | The key you can find in the Public SDK key field of your app settings in Adapty: App settings-> General tab -> API keys subsection |
logLevel | optional | Adapty logs errors and other crucial information to provide insight into your app's functionality. There are the following available levels:
|
observerMode | optional | A boolean value controlling Observer mode. Turn it on if you handle purchases and subscription status yourself and use Adapty for sending subscription events and analytics. The default value is 🚧 When running in Observer mode, Adapty SDK won't close any transactions, so make sure you're handling it. |
customerUserId | optional | An identifier of the user in your system. We send it in subscription and analytical events, to attribute events to the right profile. You can also find customers by customerUserId in the Profiles and Segments menu. |
idfaCollectionDisabled | optional | Set to The default value is For more details on IDFA collection, refer to the Analytics integration section. |
ipAddressCollectionDisabled | optional | Set to The default value is |
Use Adapty Unity Plugin
- Create a script to listen to Adapty events. Name it
AdaptyListener
in your scene. We suggest using theDontDestroyOnLoad
method for this object to ensure it persists throughout the application's lifespan.

Adapty uses AdaptySDK
namespace. At the top of your script files that use the Adapty SDK, you may add
using AdaptySDK;
- Subscribe to Adapty events:
using UnityEngine;
using AdaptySDK;
public class AdaptyListener : MonoBehaviour, AdaptyEventListener {
void Start() {
DontDestroyOnLoad(this.gameObject);
Adapty.SetEventListener(this);
}
public void OnLoadLatestProfile(Adapty.Profile profile) {
// handle updated profile data
}
}
Please keep in mind that for paywalls and products to be displayed in your mobile application, and for analytics to work, you need to display the paywalls and, if you're using paywalls not created with the Paywall Builder, handle the purchase process within your app.