Using the SDKs

This guide is for using Qonversion in the Infrastructure mode. The Infrastructure mode allows you to handle in-app purchases using the Qonversion SDK, including making purchases, handling subscription entitlements, restoring purchases.
If you are looking to use Qonversion for analytics and integrations only and do not want to make any changes in your existing purchases flow, please refer to the Observer mode guide. You can check the key features of the Infrastructure and the Observer modes here.


Import the Qonversion SDK in your module that is responsible for launching third-party dependencies:

import Qonversion
#import "Qonversion.h"
import 'package:qonversion_flutter/qonversion_flutter.dart';
import Qonversion from 'react-native-qonversion';
using QonversionUnity;

Initialize the SDK:

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    Qonversion.launch(withKey: "projectKey")
    return true
#import "Qonversion.h"
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [Qonversion launchWithKey:@"projectKey"];
    return YES;
public class App extends Application {
    public void onCreate() {
        Qonversion.launch(this, "projectKey", false);
public class App : Application {
    override fun onCreate() {
        Qonversion.launch(this, "projectKey", false)
Qonversion.launch('projectKey', isObserveMode: false);
Qonversion.launchWithKey('projectKey', false);
public class QonversionLauncher : MonoBehaviour
    private void Start()
        Qonversion.Launch("projectKey", false);
Qonversion.launchWithKey('projectKey', false);

Get your Qonversion Project Key

Set User ID

To match the events from Qonversion to users on other platforms, you need to set the same user ID on both of them:

Qonversion.setProperty(.userID, value: "yourSideUserId")
[Qonversion setProperty:QNPropertyUserID value:@"yourSideUserId"];
Qonversion.setProperty(QUserProperties.CustomUserId, "yourSideUserID");
Qonversion.setProperty(QUserProperties.CustomUserId, "yourSideUserID")
Qonversion.setProperty(QUserProperty.customUserId, 'yourSideUserId');
Qonversion.setProperty(Property.CUSTOM_USER_ID, 'yourSideUserId');
Qonversion.SetProperty(UserProperty.CustomUserId, "yourSideUserId");

The user ID improves event delivery rate to the platforms where event attribution is not exclusively based on IDFA or GAID.

Set IDFA (Identifier for Advertisers, iOS 14.5+ only)

On iOS 14.5+, after requesting the app tracking permission using ATT, you need to notify Qonversion if tracking is allowed and IDFA is available.

ATTrackingManager.requestTrackingAuthorization { status in
    switch status {
    case .authorized:
    // handle other states below
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
    switch (status) {
        case ATTrackingManagerAuthorizationStatusAuthorized:
            [Qonversion setAdvertisingID];
        // handle other states if needed

Set ASID (App set ID, Android 12+ only)

On Android 12+, you can provide an App set ID to have it used in Qonversion integrations.

Add as the dependency to your project and write the following code.

final AppSetIdClient client = AppSet.getClient(context);
final Task<AppSetIdInfo> task = client.getAppSetIdInfo();
task.addOnSuccessListener(info -> {
    final String id = info.getId();
    Qonversion.setProperty(QUserProperties.AppSetId, id);
val client = AppSet.getClient(requireContext())
client.appSetIdInfo.addOnSuccessListener { info: AppSetIdInfo ->
Qonversion.setProperty(QUserProperty.appSetId, appSetId);
Qonversion.setProperty(Property.APP_SET_ID, appSetId);
Qonversion.SetProperty(UserProperty.AppSetId, appSetId);

Did this page help you?