Adapty appsflyer integration

Hello,
I’ve integrated adapty sdk and appsflyer sdk into my unity project. Everthing is working well except one thing. When a user has purchased a product from game, this purchase is appearing on adapty but adapty cannot send data. to appsflyer.

Here is the fail ss;

Here is appsflyer integration on adapty;

Here is adapty class;

using System;
using UnityEngine;
using AdaptySDK;
using System.Collections.Generic;
using Newtonsoft.Json;
using System.Collections;
using HarfleriOgreniyorum;
using UnityEngine.Animations;
using System.Linq;

public class AdaptySDKController : MonoBehaviour, AdaptyEventListener
{

    // Satın alınacak ürünün kimliği (App Store veya Google Play'den alınır)
    private Adapty.PaywallProduct premiumProduct;
    private Adapty.Paywall paywall1 = null;
    string paywall_id = "placement_id";
    string paywall_offer_id = "offer_placement_id";

    private string pStatus;
    private bool internetConnection;

    public static AdaptySDKController Instance { get; private set; }

    private bool gotAccessLevel = false;

    void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
            DontDestroyOnLoad(gameObject);
        }
        else
        {
            Destroy(gameObject);
        }
    }
    public void RunAdapty()
    {
        GameSettings.runadapty = false;

        AppsFlyerUnity.Instance.StartAppsFlyer();

        StartCoroutine(InternetCheck());
        if (internetConnection)
            StartCoroutine(nameof(StartAdapty));
        else
            FindObjectOfType<AlertPopup>().OpenAlertPopUp("İnternet bağlantınızı kontrol edip uygulamayı yeniden başlatınız.");
    }

    IEnumerator StartAdapty()
    {
        yield return new WaitUntil(() => GameSettings.IsAppsflyerOk);
        Adapty.SetEventListener(this);
        Debug.Log("Adapty started");

#if !UNITY_EDITOR

        Debug.Log($"AppsFlyer ID in Adapty: {AppsFlyerUnity.Instance.afId}");


     


        if (!GameSettings.isPremium)
            CheckIfUserIsPremium();
        else
            FindObjectOfType<LoginAndRegister>().StartLogin();
        // RestorePurchases(false);

        // Paywall ve ürünleri çekiyoruz
        //GetPaywall("offer");
#endif
        //FindObjectOfType<LoginAndRegister>().StartLogin();

        GameSettings.IsAdaptyOk = true;
    }

    // Paywall ve ürünleri alma fonksiyonu
    public void GetPaywall(string paywallStatus)
    {
        Debug.Log("GetPaywallAndProducts");
        pStatus = paywallStatus;
        // Adapty paywall'u alıyoruz
        Adapty.GetPaywall(pStatus == "normal" ? paywall_id : paywall_offer_id, "tr", (paywall, error) =>
        {
            //paywall1 = paywall;

            Debug.Log("adapty getpaywall");
            if (error != null)
            {
                Debug.LogError("Paywall alınırken hata oluştu: " + error);
                return;
            }
            // Adapty log için paywall'u gösterildi olarak işaretliyoruz
            Adapty.LogShowPaywall(paywall, logError =>
            {
                if (logError != null)
                {
                    Debug.LogError("Paywall log hatası: " + logError);
                }
                else
                {
                    Debug.Log("Paywall gösterimi başarıyla kaydedildi.");
                }
            });
            Debug.Log("adapty paywall product");
            // Paywall'daki ürünleri çekiyoruz
            Adapty.GetPaywallProducts(paywall, (products, productError) =>
            {
                Debug.Log("adapty paywall product inside");
                if (productError != null)
                {
                    Debug.LogError("Paywall ürünleri alınırken hata oluştu: " + productError);
                    return;
                }

                if (products.Count > 0)
                {
                    // Premium ürününü ayarla (örneğin ilk ürünü kullanıyoruz)
                    premiumProduct = products[0];
                    Debug.Log("Ürün başarıyla alındı: " + premiumProduct.LocalizedTitle + " " + premiumProduct.VendorProductId);

                    //PurchasePremium();
                }
                else
                {
                    Debug.LogError("Paywall'da ürün bulunamadı.");
                }
                Debug.Log("adapty paywall product end");
            });

            // Remote config'teki veriyi alıyoruz
            if (paywall.RemoteConfig != null && paywall.RemoteConfig.ContainsKey("paywalls"))
            {
                // Remote config verisini JSON string formatına çeviriyoruz
                string json = JsonConvert.SerializeObject(paywall.RemoteConfig);
                Debug.Log("adapty remote config");
                // JSON'u parse ediyoruz
                ParseRemoteConfig(json); // daha sonra açarsın
            }
            else
            {
                Debug.LogError("Paywall'da remote config JSON verisi bulunamadı.");
            }
        });
        // AppsFlyerUnity.Instance.StartAppsFlyer();
    }

    private void ParseRemoteConfig(string json)
    {
        Debug.Log("adapty parse remote config");
        try
        {
            // JSON verisini deserialize ediyoruz
            RemoteConfigData configData = JsonConvert.DeserializeObject<RemoteConfigData>(json);

            if (configData != null && configData.paywalls != null)
            {
                foreach (var paywall in configData.paywalls)
                {
                    Debug.Log("Product ID: " + paywall.product_id);
                    Debug.Log("HTML Data: " + paywall.html_data_1);

                    WebViewManager.Instance.StartWebView(paywall.html_data_1);

                }
            }
            else
            {
                Debug.LogError("Paywalls verisi bulunamadı.");
            }
        }
        catch (Exception ex)
        {
            Debug.LogError("Remote config JSON parse edilirken hata oluştu: " + ex.Message);
        }
        Debug.Log("adapty parse config end");
    }

    // Satın alma butonuna basıldığında çalışacak fonksiyon
    public void PurchasePremium()
    {
        Debug.Log("adapty get premium");
        //PaywallCon.Instance.SetProgressPanelVisible(true);
        if (premiumProduct != null)
        {
            Debug.Log("adapty premium product " + premiumProduct.VendorProductId);
            // Satın alma işlemini başlat
            Adapty.MakePurchase(premiumProduct, (profile, error) =>
            {
                if (error != null)
                {
                    Debug.LogError("Satın alma başarısız: " + error);
                    //PaywallCon.Instance.SetProgressPanelVisible(false);
                    FindObjectOfType<AlertPopup>().OpenAlertPopUp("Satın alma başarısız.");

                    WebViewManager.Instance.SetTimePauseState();
                    return;
                }

                Debug.Log($"Purchase successful - Product ID: {premiumProduct.VendorProductId}");
                Debug.Log($"Profile ID: {profile.ProfileId}");

                // Profil bilgilerini JSON olarak yazdır
                string profileJson = JsonConvert.SerializeObject(profile);
                Debug.Log($"Profile Data: {profileJson}");

                // Satın alma başarılı olduysa, premium erişimini açıyoruz
                Debug.Log("Satın alma başarılı. Ürün ID: " + premiumProduct.LocalizedTitle + " " + premiumProduct.VendorProductId);

                // Satın alma sonrası işlemler (örneğin premium içeriğin kilidini açma)
                UnlockPremiumContent();

                CleverTapUnity.Instance.PurchaseSuccess(pStatus);
                AppsFlyerUnity.Instance.PurchaseSuccess(pStatus);
                FirebaseAnaliticsSDK.Instance.PurchaseSuccess(pStatus);

                FindObjectOfType<AlertPopup>().OpenAlertPopUp("Artık tüm harfleri oynayabilirsin!", "success");
                SoundManagerSecond.Instance.PlaySound("bf08d753-477f-4966-c382-08da9709f811", true);

                StartCoroutine(nameof(DestroyWebview));


            });
        }
        else
        {
            Debug.LogError("Satın alma işlemi için ürün ayarlanmadı.");
            // PaywallCon.Instance.SetProgressPanelVisible(false);
            FindObjectOfType<AlertPopup>().OpenAlertPopUp("Satın alma işlemi için ürün ayarlanmadı.");
        }
    }
    IEnumerator DestroyWebview()
    {
        yield return new WaitForSeconds(1);
        WebViewManager.Instance.DestroyWebview();

    }
    public void RestorePurchases(bool showAlert)
    {
        Adapty.RestorePurchases((profile, error) =>
                    {
                        if (error != null)
                        {
                            Debug.Log("restore sirasinda hata " + error);
                            if (showAlert)
                            {
                                FindObjectOfType<AlertPopup>().OpenAlertPopUp("Restore sırasinda hata");
                                EventManager.Broadcast(GameEvent.OnAdaptyIAPChecked, false);
                            }

                            return;
                        }

                        try
                        {
                            var accessLevel1 = profile.AccessLevels["ho_premium"];
                            if (accessLevel1 != null && accessLevel1.IsActive)
                            {
                                Debug.Log("Kullanıcı premium erişime sahip.");

                                // Premium içeriğin kilidini aç
                                UnlockPremiumContent();

                                gotAccessLevel = true;

                                if (showAlert)
                                {
                                    FindObjectOfType<AlertPopup>().OpenAlertPopUp("Satın alımlar geri yüklendi.", "success");
                                    EventManager.Broadcast(GameEvent.OnAdaptyIAPChecked, true);
                                }
                            }
                            else
                            {
                                Debug.Log("Daha önce satın aldığınız bir ürün bulunamadı.");
                                if (showAlert)
                                {
                                    FindObjectOfType<AlertPopup>().OpenAlertPopUp("Daha önce satın aldığınız bir ürün bulunamadı.");
                                    EventManager.Broadcast(GameEvent.OnAdaptyIAPChecked, false);
                                }

                                //GameSettings.isPremium = false;
                            }
                        }
                        catch (System.Exception e)
                        {
                            Debug.Log("access level erişiminde hata " + e.Message);
                            // if (showAlert)
                            // {
                            //     FindObjectOfType<AlertPopup>().OpenAlertPopUp("Erişim hatası. Daha önce satın aldığınız bir ürün bulunamadı.");
                            //     EventManager.Broadcast(GameEvent.OnAdaptyIAPChecked, false);
                            // }
                        }

                        if (!gotAccessLevel)
                        {
                            try
                            {
                                var accessLevel2 = profile.AccessLevels["offer_premium"];
                                if (accessLevel2 != null && accessLevel2.IsActive)
                                {
                                    Debug.Log("Kullanıcı premium erişime sahip.");

                                    // Premium içeriğin kilidini aç
                                    UnlockPremiumContent();
                                    gotAccessLevel = true;
                                    if (showAlert)
                                    {
                                        FindObjectOfType<AlertPopup>().OpenAlertPopUp("Satın alımlar geri yüklendi.", "success");
                                        EventManager.Broadcast(GameEvent.OnAdaptyIAPChecked, true);
                                    }
                                }
                                else
                                {
                                    Debug.Log("Daha önce satın aldığınız bir ürün bulunamadı.");
                                    if (showAlert)
                                    {
                                        FindObjectOfType<AlertPopup>().OpenAlertPopUp("Daha önce satın aldığınız bir ürün bulunamadı.");
                                        EventManager.Broadcast(GameEvent.OnAdaptyIAPChecked, false);
                                    }

                                    //GameSettings.isPremium = false;
                                }
                            }
                            catch (System.Exception e)
                            {
                                Debug.Log("access level erişiminde hata " + e.Message);
                                if (showAlert)
                                {
                                    FindObjectOfType<AlertPopup>().OpenAlertPopUp("Erişim hatası. Daha önce satın aldığınız bir ürün bulunamadı.");
                                    EventManager.Broadcast(GameEvent.OnAdaptyIAPChecked, false);
                                }
                            }
                        }

                    });
    }

    // Kullanıcının premium olup olmadığını kontrol eden fonksiyon
    private void CheckIfUserIsPremium()
    {
        Debug.Log("adapty check is user premium");
        Adapty.GetProfile((profile, error) =>
        {
            Debug.Log("adapty get profile");
            if (error != null)
            {
                Debug.Log("Kullanıcı profili alınamadı: " + error);
                return;
            }

            Debug.Log("profileid " + profile.ProfileId);

            try
            {
                var accessLevel1 = profile.AccessLevels["ho_premium"];

                if (accessLevel1 != null && accessLevel1.IsActive)
                {
                    Debug.Log("Kullanıcı premium erişime sahip.");

                    // Premium içeriğin kilidini aç
                    UnlockPremiumContent();
                }
                else
                {
                    Debug.Log("Kullanıcı premium erişime sahip değil.");
                    // GameSettings.isPremium = false;
                }
            }
            catch (Exception e)
            {
                Debug.Log("access level erişiminde hata " + e.Message);
            }

            try
            {
                var accessLevel2 = profile.AccessLevels["offer_premium"];

                if (accessLevel2 != null && accessLevel2.IsActive)
                {
                    Debug.Log("Kullanıcı premium erişime sahip.");

                    // Premium içeriğin kilidini aç
                    UnlockPremiumContent();
                }
                else
                {
                    Debug.Log("Kullanıcı premium erişime sahip değil.");
                    // GameSettings.isPremium = false;
                }
            }
            catch (Exception e)
            {
                Debug.Log("access level erişiminde hata " + e.Message);
            }

            Debug.Log("adapty get profile end");

            FindObjectOfType<LoginAndRegister>().StartLogin();
            // GameSettings.IsAdaptyOk = true;
        });
    }

    // Premium içeriğin kilidini açan fonksiyon
    private void UnlockPremiumContent()
    {
        Debug.Log("Premium içeriğin kilidi açıldı!");
        GameSettings.isPremium = true;
        GameSettings.getPremium = false;

        // Burada premium içeriklerin kilidini açmak için kodlarını yazabilirsin.
    }

    public void OnLoadLatestProfile(Adapty.Profile profile)
    {
        throw new NotImplementedException();
    }
    public IEnumerator InternetCheck()
    {
        internetConnection = false;

#if UNITY_WEBGL
            //internetConnection = InternetCheckJs();
            internetConnection = false;
#elif UNITY_ANDROID || UNITY_IOS
        if (Application.internetReachability == NetworkReachability.NotReachable)
        {
            internetConnection = false;
        }
        else
        {
            internetConnection = true;
        }
#endif
        yield return internetConnection;
    }
}
// Remote config'teki JSON verisine uygun sınıflar
[Serializable]
public class PaywallData
{
    public string product_id { get; set; }
    public string html_data_1 { get; set; }
}

[Serializable]
public class RemoteConfigData
{
    public List<PaywallData> paywalls { get; set; }
}

Here is appsflyer class;

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using AppsFlyerSDK;
using System;

#if UNITY_IOS
using Unity.Advertisement.IosSupport;
#endif



public class AppsFlyerUnity : MonoBehaviour, IAppsFlyerConversionData, IAppsFlyerUserInvite
{

    // These fields are set from the editor so do not modify!
    //******************************//
    public string devKey;
    public string appID;
    public string UWPAppID;
    public bool isDebug;
    public bool getConversionData;
    //******************************//

    #region AppsFlyer Related Fields

    private bool _didReceivedDeepLink; // marks if we got a DL and processed it
    private bool _deferred_deep_link_processed_flag; // only for Legacy Links users - marks if the Deffered DL was processed by UDL or not
    private string _userInviteLink;
    private Dictionary<string, object> _conversionDataDictionary;
    private Dictionary<string, object> _deepLinkParamsDictionary;
    public static AppsFlyerUnity Instance { get; private set; }

    public string afId;


    #endregion

    #region AppsFlyer Related Properties

    public string UserInviteLink
    {
        get => _userInviteLink;
    }

    public Dictionary<string, object> ConversionData
    {
        get => _conversionDataDictionary;
    }

    public Dictionary<string, object> DeepLinkParams
    {
        get => _deepLinkParamsDictionary;
    }

    #endregion

    #region Game Mechanics Fields

    private int _startLevel = 1;
    private int _extraButterfliesBonus;
    private int _useInviteBextraButterfliesBonus;
    private int _extraPointsBonus;

    #endregion

    #region Game Mechanics Properties

    public int ExtraButterflies
    {
        get => _extraButterfliesBonus;
        set => _extraButterfliesBonus = value;
    }

    public int ExtraPoints
    {
        get => _extraPointsBonus;
        set => _extraPointsBonus = value;
    }

    public bool DidReceivedDeepLink
    {
        get => _didReceivedDeepLink;
        set => _didReceivedDeepLink = value;
    }

    public int StartLevel
    {
        get => _startLevel;
    }

    #endregion

    void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
            DontDestroyOnLoad(gameObject);
        }
        else
        {
            Destroy(gameObject);
        }
    }
    public void PaywallEvent(string paywallEvent)
    {
        AppsFlyer.sendEvent(paywallEvent, null);
    }
    public void PurchaseSuccess(string pStatus)
    {
        AppsFlyer.sendEvent(pStatus == "normal" ? "subscription_started" : "offer_subscription_started", null);
    }

    public void StartAppsFlyer()
    {
#if UNITY_ANDROID
        appID = "android_id";
#elif UNITY_IOS
        appID = "ios_id";
#endif

        Debug.Log("appsflyer started");

        AppsFlyer.setIsDebug(isDebug);

        //AppsFlyer.getConversionData(this.name);

        // Authentication bilgilerini kontrol edelim
        Debug.Log($"Checking AppsFlyer Authentication...");
        Debug.Log($"Dev Key: {devKey}");
        Debug.Log($"App ID: {appID}");


        AppsFlyer.initSDK(devKey, appID, getConversionData ? this : null); // getConversionData is true

        afId = AppsFlyer.getAppsFlyerId();
        Debug.Log($"AppsFlyer ID: {afId}");

        //AppsFlyer.setCustomerUserId(SystemInfo.deviceUniqueIdentifier);

        //******************************/

        // set a custom method to handle deep link received - only on deep linking implementation
        // AppsFlyer.OnDeepLinkReceived += OnDeepLink;

        // set up the one link ID for the user invite - only on user invite implementation
        //AppsFlyer.setAppInviteOneLinkID("45rv");

        // App Tracking Transparency for iOS
#if UNITY_IOS && !UNITY_EDITOR
        AppsFlyer.waitForATTUserAuthorizationWithTimeoutInterval(60);
        /** if you are using v6.6.0+ use this call instead:
        *   AppsFlyer.waitForATTUserAuthorizationWithTimeoutInterval(60);

        */
        Debug.Log("ATT izni isteniyor");
        StartCoroutine(RequestTrackingPermission());
        // if (ATTrackingStatusBinding.GetAuthorizationTrackingStatus()
        //     == ATTrackingStatusBinding.AuthorizationTrackingStatus.NOT_DETERMINED)
        // {
        //     Debug.Log("ATT izni alınıyor");
        //     ATTrackingStatusBinding.RequestAuthorizationTracking();
        // }

        // Debug.Log("izin durumu " + ATTrackingStatusBinding.GetAuthorizationTrackingStatus());

#elif UNITY_ANDROID && !UNITY_EDITOR

        // start the SDK
        StartSDK();

#endif

    }
#if UNITY_IOS && !UNITY_EDITOR
    IEnumerator RequestTrackingPermission()
    {
        // Eğer izni belirlenmemişse, izin isteme penceresini göster
        if (ATTrackingStatusBinding.GetAuthorizationTrackingStatus() == ATTrackingStatusBinding.AuthorizationTrackingStatus.NOT_DETERMINED)
        {
            Debug.Log("ATT izni alınıyor");
            ATTrackingStatusBinding.RequestAuthorizationTracking();

            // Kullanıcı izni seçeneğini yapana kadar bekle
            yield return StartCoroutine(WaitForAuthorization());
        }
        else
        {
            StartSDK();
        }

        // Kullanıcı izni seçimini yaptıktan sonra izni kontrol et
        Debug.Log("izin durumu " + ATTrackingStatusBinding.GetAuthorizationTrackingStatus());

        //StartSDK();
    }
    // İzin yanıtı gelene kadar beklemek için bir Coroutine
    IEnumerator WaitForAuthorization()
    {
        // İzin durumu hala 'NOT_DETERMINED' olduğu sürece bekle
        while (ATTrackingStatusBinding.GetAuthorizationTrackingStatus() == ATTrackingStatusBinding.AuthorizationTrackingStatus.NOT_DETERMINED)
        {
            yield return null; // Bir sonraki frame'e kadar bekle
        }
        
        StartSDK();
    }
#endif
    private void StartSDK()
    {
        // start the SDK
        AppsFlyer.startSDK();

        if (!PlayerPrefs.HasKey("HO_af_first_open"))
        {
            AppsFlyer.sendEvent("first_open", null);
            PlayerPrefs.SetString("HO_af_first_open", "first_open");
        }
        AppsFlyer.sendEvent("app_launched", null);

        Debug.Log("Appsflyer startsdk");

        GameSettings.IsAppsflyerOk = true;

        //CleverTapUnity.Instance.OnInit();
    }
    #region Conversion Data

    public void onConversionDataSuccess(string conversionData)
    {

        // Log ekleyelim
        Debug.Log($"AppsFlyer Conversion Data: {conversionData}");
        Debug.Log($"AppsFlyer ID onConversionDataSuccess: {afId}");

        //string appsFlyerId = AppsFlyer.getAppsFlyerId();
        AdaptySDK.Adapty.UpdateAttribution(conversionData, AdaptySDK.Adapty.AttributionSource.Appsflyer, afId, (error) =>
        {
            if (error != null)
            {
                Debug.LogError($"Adapty Attribution Error: {error}");
            }
            else
            {
                Debug.Log("Adapty Attribution Updated Successfully");
            }
        });

        AppsFlyer.AFLog("didReceiveConversionData", conversionData);
        Dictionary<string, object> conversionDataDictionary = AppsFlyer.CallbackStringToDictionary(conversionData);
        _conversionDataDictionary = conversionDataDictionary;


        /** This section is for Legacy Links Users Only. if you don't use it you can skip this implementation **/

        // af_status and is_first_launch always received with onConversionDataSuccess, no need to check if the keys exist
        string afStatus = _conversionDataDictionary["af_status"].ToString();
        bool isFirstLaunch = (bool)_conversionDataDictionary["is_first_launch"];

        // check if we got Deferred Deep Link
        if (afStatus == "Non-organic" && isFirstLaunch)
        {
            // check if the Deferred Deep Link was processed by the onDeepLink(UDL)
            if (!_deferred_deep_link_processed_flag)
            {
                // if not, process the custom param("start_level") that replaced the deep_link_value
                // additional params can be processed the same way
                _deepLinkParamsDictionary = new Dictionary<string, object>(); // reset the DL params from the previous DL processing

                if (_conversionDataDictionary.TryGetValue("start_level", out var startLevelObj))
                {
                    if (int.TryParse(startLevelObj?.ToString(), out var startLevel))
                    {
                        _startLevel = startLevel;
                        _deepLinkParamsDictionary.Add("Start Level", _startLevel);
                        _didReceivedDeepLink = true;
                    }
                }
            }
            else
            {
                // if it was, no need for further processing
                _deferred_deep_link_processed_flag = false;
            }
        }
    }

    public void onConversionDataFail(string error)
    {
        AppsFlyer.AFLog("didReceiveConversionDataWithError", error);
        // If we dont get the convertion data set the field to null
        _conversionDataDictionary = new Dictionary<string, object>()
        {
            ["convertion_data_error"] = true
        };
    }

    public void onAppOpenAttribution(string attributionData)
    {
        AppsFlyer.AFLog("onAppOpenAttribution", attributionData);
        // add direct deeplink logic here
    }

    public void onAppOpenAttributionFailure(string error)
    {
        AppsFlyer.AFLog("onAppOpenAttributionFailure", error);
    }

    #endregion


    #region Deep Link

    /** All the DeepLink handling has to be done under the onDeepLink handler **/
    void OnDeepLink(object sender, EventArgs args)
    {
        if (!(args is DeepLinkEventsArgs deepLinkEventArgs)) return;

        AppsFlyer.AFLog("DeepLink Status", deepLinkEventArgs.status.ToString());

        switch (deepLinkEventArgs.status)
        {
            case DeepLinkStatus.FOUND:

                _didReceivedDeepLink = true;

                if (deepLinkEventArgs.isDeferred())
                {
                    AppsFlyer.AFLog("OnDeepLink", "This is a deferred deep link");
                    // **only for Legacy Links users**
                    // lets the onConversionDataSuccess know we got the Deferred Deep Link and assume we can process it
                    // this can be changed later on if we got an Extended Deferred DeepLinking that can not be processed by UDL
                    // we will know the type of the DDL only on the ParseDeepLinkParams() method
                    _deferred_deep_link_processed_flag = true;
                }
                else
                {
                    AppsFlyer.AFLog("OnDeepLink", "This is a direct deep link");
                }

                var deepLinkParamsDictionary = GetDeepLinkParamsDictionary(deepLinkEventArgs);
                if (deepLinkParamsDictionary != null)
                {
                    ParseDeepLinkParams(deepLinkParamsDictionary);
                }
                break;

            case DeepLinkStatus.NOT_FOUND:
                AppsFlyer.AFLog("OnDeepLink", "Deep link not found");

                _deepLinkParamsDictionary = new Dictionary<string, object>()
                {
                    ["deep_link_not_found"] = true
                };

                break;

            default:
                AppsFlyer.AFLog("OnDeepLink", "Deep link error");

                _deepLinkParamsDictionary = new Dictionary<string, object>()
                {
                    ["deep_link_error"] = true
                };

                break;
        }
    }


    /** Get the DeepLink params depending on the device OS **/
    private Dictionary<string, object> GetDeepLinkParamsDictionary(DeepLinkEventsArgs deepLinkEventArgs)
    {
#if UNITY_IOS && !UNITY_EDITOR
    if (deepLinkEventArgs.deepLink.ContainsKey("click_event") && deepLinkEventArgs.deepLink["click_event"] != null)
    {
        return deepLinkEventArgs.deepLink["click_event"] as Dictionary<string, object>;
    }
#elif UNITY_ANDROID && !UNITY_EDITOR
    return deepLinkEventArgs.deepLink;
#endif

        return null;
    }


    /**
    Parse the DeepLink params, according to the conventions between the campaign manager and the developer. 
    Both have to agree on the meaning of each key of the Deep Link parameters.

    In this app:
    deep_link_value is the start level
    deep_link_sub1 is the quantity of the extra butterflies
    deep_link_sub2 is the extra points
    deep_link_sub3 is the referrer name if the link was generated using UserInvite

    If you don't want/can't use deep_link_value, you can add a custom param.
    the campaign manager and the developer agreed on the param 'start_level'as the deep link value param,
    instead of deep_link_value.
    **/
    private void ParseDeepLinkParams(Dictionary<string, object> deepLinkParamsDictionary)
    {
        _deepLinkParamsDictionary = new Dictionary<string, object>(); // reset the DL params from the previous DL processing

        // check if we got deep_link_value and its not null
        if (deepLinkParamsDictionary.TryGetValue("deep_link_value", out var deepLinkValueObj) && int.TryParse(deepLinkValueObj?.ToString(), out var deepLinkValue))
        {
            _startLevel = deepLinkValue;
            _deepLinkParamsDictionary.Add("Start Level", _startLevel);
        }
        // **only for Legacy Links users** if not, search for the custom param that replaces the deep_link_value.
        else if (deepLinkParamsDictionary.TryGetValue("start_level", out var startLevelObj) && int.TryParse(startLevelObj?.ToString(), out var startLevel))
        {
            _startLevel = startLevel;
            _deepLinkParamsDictionary.Add("Start Level", _startLevel);
        }
        // **only for Legacy Links users**
        else
        {
            // onDeepLink(UDL) cant handle Extended Deferred DeepLinking, mark to the onConversionDataSuccess to process it
            _deferred_deep_link_processed_flag = false;
        }
        // check for others DeepLink params
        if (deepLinkParamsDictionary.TryGetValue("deep_link_sub1", out var extraButterfliesBonusObj))
        {
            if (int.TryParse(extraButterfliesBonusObj?.ToString(), out var extraButterfliesBonus))
            {
                _extraButterfliesBonus = extraButterfliesBonus;
                _deepLinkParamsDictionary.Add("Extra Butterflies", _extraButterfliesBonus);
            }
        }

        if (deepLinkParamsDictionary.TryGetValue("deep_link_sub2", out var extraPointsBonusObj))
        {
            if (int.TryParse(extraPointsBonusObj?.ToString(), out var extraPointsBonus))
            {
                _extraPointsBonus = extraPointsBonus;
                _deepLinkParamsDictionary.Add("Extra Points", _extraPointsBonus);
            }
        }

        if (deepLinkParamsDictionary.TryGetValue("deep_link_sub3", out var referrerNameObj))
        {
            var referrerName = referrerNameObj?.ToString();
            _deepLinkParamsDictionary.Add("Referrer Name", referrerName);
        }
    }

    #endregion


    #region In-App Events

    /** custom method to generate User Invite link **/
    public void SendLevelAchievedEvent(string levelName, string score)
    {

        Dictionary<string, string> levelAchievedEvent = new
        Dictionary<string, string>();
        levelAchievedEvent.Add(AFInAppEvents.LEVEL, levelName);
        levelAchievedEvent.Add(AFInAppEvents.SCORE, score);
        AppsFlyer.sendEvent(AFInAppEvents.LEVEL_ACHIEVED, levelAchievedEvent);

    }

    #endregion


    #region User Invite

    /** custom method to generate User Invite link **/
    public void generateAppsFlyerLink(string referrerName, string deepLinkValue, string deepLinkSub1, string deepLinkSub2, int currentUserInviteExtraButterflies)
    {
        _userInviteLink = null;
        _useInviteBextraButterfliesBonus = currentUserInviteExtraButterflies;
        Dictionary<string, string> parameters = new Dictionary<string, string>();
        parameters.Add("channel", "Unity_Native");
        parameters.Add("campaign", "invite_and_get_five_free_butterflies");
        parameters.Add("deep_link_value", deepLinkValue);
        parameters.Add("deep_link_sub1", deepLinkSub1);
        parameters.Add("deep_link_sub2", deepLinkSub2);
        parameters.Add("deep_link_sub3", referrerName);


        // other params
        //parameters.Add("referrerImageUrl", "some_referrerImageUrl");
        //parameters.Add("customerID", "some_customerID");
        //parameters.Add("baseDeepLink", "some_baseDeepLink");
        //parameters.Add("brandDomain", "some_brandDomain");
        AppsFlyer.generateUserInviteLink(parameters, this);
    }

    public void onInviteLinkGenerated(string link)
    {
        AppsFlyer.AFLog("onInviteLinkGenerated", link);
        _userInviteLink = link;
        _extraButterfliesBonus += _useInviteBextraButterfliesBonus;

    }

    public void onInviteLinkGeneratedFailure(string error)
    {
        AppsFlyer.AFLog("onInviteLinkGeneratedFailure", error);
        _userInviteLink = null;
    }

    public void onOpenStoreLinkGenerated(string link)
    {
        AppsFlyer.AFLog("onOpenStoreLinkGenerated", link);
    }

    #endregion
}

Also, adapty-info.plist and android manifest file is okay.

Can you help me to find solution?

Has anyone done this integration before?