AppsFlyerSDK / appsflyer-react-native-plugin

AppsFlyer plugin for React Native
MIT License
278 stars 198 forks source link

ATT pop-up not showing up on first launch #328

Closed adamTrz closed 2 years ago

adamTrz commented 2 years ago

Report

ATT Popup is not showing consistently for users. For some users ATT dialog is showing only on the second launch of the app (when they move the app to background and then back to foreground), for others it's only showing when they reject Push Notifications permission dialog that we are showing on Home Screen. For others it's not shown at all.

Plugin Version

6.3.20 and higher (including 6.4.0)

On what Platform are you having the issue?

iOS, versions 14.5+

What did you do?

Plugin installation was successfull

What did you expect to happen?

ATT pop up should be shown consistently.

What happened instead?

ATT pop up not showing up at some times.

Please provide any other relevant information.

AppsFlyer initialization code:

appsFlyer.initSdk({
      devKey: APPSFLYER_DEV_KEY,
      isDebug: process.env.NODE_ENV === 'development',
      appId: APPSFLYER_APP_ID,
      onInstallConversionDataListener: true,
      onDeepLinkListener: false,
      timeToWaitForATTUserAuthorization: 120
    })
xCode logs: ```js 2021-10-05 10:30:20.382985+0200 app[17728:5758772] [AppsFlyerSDK] [com.facebook.react.RNAppsFlyerQueue] AppsFlyer SDK version 6.4.0 started build (29) 2021-10-05 10:30:20.383201+0200 app[17728:5758772] [AppsFlyerSDK] [com.facebook.react.RNAppsFlyerQueue] Keychain items migration status: 0 2021-10-05 10:30:20.383496+0200 app[17728:5757743] AppsFlyer Debug: handle deep link 2021-10-05 10:30:20.383564+0200 app[17728:5758772] [AppsFlyerSDK] [com.facebook.react.RNAppsFlyerQueue] * AppsFlyer is set to debug mode. This should only be used in development environment! * 2021-10-05 10:30:20.383779+0200 app[17728:5758772] [AppsFlyerSDK] [com.appsflyer.serial] Dynamically loaded library: AppTrackingTransparency 2021-10-05 10:30:20.672352+0200 app[17728:5758772] [AppsFlyerSDK] [com.appsflyer.serial] Start 2021-10-05 10:30:20.672658+0200 app[17728:5758772] [AppsFlyerSDK] [com.appsflyer.serial] [CLS] ASIdentifierManager loaded 2021-10-05 10:30:20.672816+0200 app[17728:5758772] [AppsFlyerSDK] [com.appsflyer.serial] [CLS] ADClient not found 2021-10-05 10:30:20.673046+0200 app[17728:5758772] [AppsFlyerSDK] [com.appsflyer.serial] [CLS] FBSDKAppEventsUtility not found 2021-10-05 10:30:20.673206+0200 app[17728:5758772] [AppsFlyerSDK] [com.appsflyer.serial] isFirstLaunch: No, timestamp: 1633095313.879347 2021-10-05 10:30:20.673581+0200 app[17728:5758772] [AppsFlyerSDK] [com.appsflyer.serial] First `start` since application termintaion/installation 2021-10-05 10:30:20.673852+0200 app[17728:5758772] [AppsFlyerSDK] [com.appsflyer.serial] `appsFlyerDevKey`: PZ*****jD 2021-10-05 10:30:20.780991+0200 app[17728:5757743] [AppsFlyerSDK] [com.appsflyer.serial] Looking for previous version date 2021-10-05 10:30:20.781199+0200 app[17728:5757743] [AppsFlyerSDK] [com.appsflyer.serial] Current cached application version: 1.2.0, new version: 1.2.0 2021-10-05 10:30:20.781384+0200 app[17728:5757743] [AppsFlyerSDK] [com.appsflyer.serial] Use date3 from storage 2021-10-05 10:30:20.781554+0200 app[17728:5757743] [AppsFlyerSDK] [com.appsflyer.serial] date1: 2021-10-01_153454+0200 2021-10-05 10:30:20.781722+0200 app[17728:5757743] [AppsFlyerSDK] [com.appsflyer.serial] date2: 2021-10-01_153454+0200 2021-10-05 10:30:20.781896+0200 app[17728:5757743] [AppsFlyerSDK] [com.appsflyer.serial] date3: 2021-10-01_153454+0200 2021-10-05 10:30:20.782080+0200 app[17728:5757743] [AppsFlyerSDK] [com.appsflyer.serial] First launch date: 2021-10-01_153513+0200 2021-10-05 10:30:20.782248+0200 app[17728:5757743] [AppsFlyerSDK] [com.appsflyer.serial] [SKAd] Times out. sk_exp = 1633181714.134963 2021-10-05 10:30:20.782427+0200 app[17728:5757743] [AppsFlyerSDK] [com.appsflyer.serial] [iAD]: Cached `Apple Search Ads`: Yes, ASA disable: 0 2021-10-05 10:31:22.132686+0200 app[17728:5760186] [AppsFlyerSDK] [com.appsflyer.serial] `appsFlyerDevKey`: PZ*****jD 2021-10-05 10:31:22.134298+0200 app[17728:5760188] [AppsFlyerSDK] [com.appsflyer.serial] Looking for previous version date 2021-10-05 10:31:22.134551+0200 app[17728:5760188] [AppsFlyerSDK] [com.appsflyer.serial] Current cached application version: 1.2.0, new version: 1.2.0 2021-10-05 10:31:22.134752+0200 app[17728:5760188] [AppsFlyerSDK] [com.appsflyer.serial] Use date3 from storage 2021-10-05 10:31:22.134925+0200 app[17728:5760188] [AppsFlyerSDK] [com.appsflyer.serial] date1: 2021-10-01_153454+0200 2021-10-05 10:31:22.135074+0200 app[17728:5760188] [AppsFlyerSDK] [com.appsflyer.serial] date2: 2021-10-01_153454+0200 2021-10-05 10:31:22.135215+0200 app[17728:5760188] [AppsFlyerSDK] [com.appsflyer.serial] date3: 2021-10-01_153454+0200 2021-10-05 10:31:22.135378+0200 app[17728:5760188] [AppsFlyerSDK] [com.appsflyer.serial] First launch date: 2021-10-01_153513+0200 2021-10-05 10:31:22.135524+0200 app[17728:5760188] [AppsFlyerSDK] [com.appsflyer.serial] [SKAd] Times out. sk_exp = 1633181714.134963 2021-10-05 10:32:20.632428+0200 app[17728:5760925] [AppsFlyerSDK] [com.appsflyer.serial] [ATT.2] ATT timer expired. Preparing queued events: 2 2021-10-05 10:32:20.632627+0200 app[17728:5760925] [AppsFlyerSDK] [com.appsflyer.serial] NotDetermined 2021-10-05 10:32:20.632855+0200 app[17728:5760925] [AppsFlyerSDK] [com.appsflyer.serial] NotDetermined 2021-10-05 10:32:20.633753+0200 app[17728:5760925] [AppsFlyerSDK] [com.appsflyer.serial] [CACHE] Caching request...(cache size: 0) 2021-10-05 10:32:20.638951+0200 app[17728:5760188] [AppsFlyerSDK] [com.appsflyer.serial] [CACHE] Caching request...(cache size: 1) 2021-10-05 10:32:20.639223+0200 app[17728:5760925] [AppsFlyerSDK] [afsdk-inner-buffer-serial] [HTTP] Operation start: `288-1633422620.781154` 2021-10-05 10:32:20.640103+0200 app[17728:5760925] [AppsFlyerSDK] [afsdk-inner-buffer-serial] <~+~ SEND Start: https://launches.appsflyer.com/api/v6.4/iosevent?app_id=1550127924&buildnumber=6.4.0 {"cell":{"mcc":"tv|sim","mnc":"tv|sim","ra":"tv|sim"},"uid":"1633095294017-9779664","bundlename":"Thriva","platformextension":"ios_segment","timestamp":"1633422620.781154","att_status":0,"platform":"x86_64","counter":"3","prev_session_dur":156,"sk_rules":{"sk_exp":1633181714.134963,"sk_rules":{"wi":24,"s2s":true}},"reinstallCounter":"0","advertiserId":"","systemversion":"15.0","iaecounter":"0","meta":{"att":{"queued":true}},"JBDevice":false,"date3":"2021-10-01_153454+0200","deviceData":{"cpu_type":"ARM64","cpu_speed":"-1","osVersion":"99.9 (Build 99999)","ram_size":"999","cpu_64bits":"true","dim":{"y_px":2532,"x_px":1170},"device_model":"x86_64","cpu_count":"9"},"sc_o":"simulator","open_referrer":"","currentCountrycode":"US","systemname":"iOS","date1":"2021-10-01_153454+0200","localizedmodel":"iPhone","ivc":false,"af_events_api":"1","gcd_timing":2208,"bundleversion":"44","model":"iPhone","eventName":"Launched","dev_key":"PZF8JWiQAjScxZ9TL8YvjD","currentLanguage":"","wifi":false,"vendorId":"F9FB7EAB-7966-4BD3-847C-BAD9199337FD","eventvalue":"","serverApiVersion":"6.4","af_timestamp":"1633422620781","advertiserIdEnabled":false,"cksm_v1":"e147195adfe0f51f7af761ab46861c74","ref":"db7329eef4753e02f2f61ae54182f260365b4da62dc7cab86fc41cde012bd3f8;0;0;0;0;0","af_iad_data":{"error":"ADClientErrorTrackingRestrictedOrDenied"},"event":"Launched","date1_2":"2021-10-01_153454+0200","disk":"999\/9999","sessioncounter":"2","load_framework_result":"NotDetermined","date2":"2021-10-01_153454+0200","firstLaunchDate":"2021-10-01_153513+0200","originalAppsflyerId":"1633095294017-9779664","shortbundleversion":"1.2.0","timepassedsincelastlaunch":"327305","bundleIdentifier":"co.app.app"} 2021-10-05 10:32:20.888749+0200 app[17728:5760925] [AppsFlyerSDK] [com.apple.NSURLSession-delegate] [HTTP] 2021-10-05 10:32:20.888950+0200 app[17728:5760925] [AppsFlyerSDK] [com.apple.NSURLSession-delegate] Loading conversion data 2021-10-05 10:32:20.889211+0200 app[17728:5762126] [AppsFlyerSDK] [com.apple.NSURLSession-delegate] [GCD-A02] -[RNAppsFlyer onConversionDataSuccess:]: 2021-10-05 10:32:20.997085+0200 app[17728:5760924] [AppsFlyerSDK] [afsdk-buffer-serial] [CACHE] Deleting file: /Users/adam/Library/Developer/CoreSimulator/Devices/60ED698A-C68E-4A37-AF43-AC54136D4531/data/Containers/Data/Application/42D3C6EA-2C23-4257-8C5B-E82841554265/Library/Caches/appsflyer-v1/655115540.6337.plist 2021-10-05 10:32:20.998280+0200 app[17728:5760924] [AppsFlyerSDK] [afsdk-buffer-serial] [HTTP] Dealloc. Time elapsed for: `288-1633422620.781154` - 0.3590189218521118 2021-10-05 10:32:20.998513+0200 app[17728:5762132] [AppsFlyerSDK] [afsdk-inner-buffer-serial] [HTTP] Operation start: `16-1633422682.134353` 2021-10-05 10:32:20.998897+0200 app[17728:5762132] [AppsFlyerSDK] [afsdk-inner-buffer-serial] <~+~ SEND Event: https://inapps.appsflyer.com/api/v6.4/iosevent?app_id=1550127924&buildnumber=6.4.0 {"timestamp":"1633422682.134353","uid":"1633095294017-9779664","bundlename":"Thriva","cell":{"mcc":"tv|sim","mnc":"tv|sim","ra":"tv|sim"},"att_status":0,"platform":"x86_64","counter":"3","prev_session_dur":156,"reinstallCounter":"0","advertiserId":"","systemversion":"15.0","iaecounter":"1","meta":{"att":{"queued":true}},"JBDevice":false,"date3":"2021-10-01_153454+0200","deviceData":{"cpu_type":"ARM64","cpu_speed":"-1","osVersion":"99.9 (Build 99999)","ram_size":"999","cpu_64bits":"true","dim":{"y_px":2532,"x_px":1170},"device_model":"x86_64","cpu_count":"9"},"currentCountrycode":"US","sc_o":"simulator","systemname":"iOS","date1":"2021-10-01_153454+0200","localizedmodel":"iPhone","ivc":false,"af_events_api":"1","bundleversion":"44","model":"iPhone","eventName":"SignIn Completed","dev_key":"PZF8JWiQAjScxZ9TL8YvjD","currentLanguage":"","wifi":false,"vendorId":"F9FB7EAB-7966-4BD3-847C-BAD9199337FD","eventvalue":"%7B%22email%22:%22kirstie-mobile-test@app.co%22%7D","af_timestamp":"1633422682134","serverApiVersion":"6.4","advertiserIdEnabled":false,"cksm_v1":"2bc12618ea8a6039130167519aedc22c","ref":"db7329eef4753e02f2f61ae54182f260365b4da62dc7cab86fc41cde012bd3f8;0;0;0;0;0","af_iad_data":{"error":"ADClientErrorTrackingRestrictedOrDenied"},"event":"SignIn Completed","date1_2":"2021-10-01_153454+0200","disk":"999\/9999","sessioncounter":"2","load_framework_result":"NotDetermined","date2":"2021-10-01_153454+0200","firstLaunchDate":"2021-10-01_153513+0200","originalAppsflyerId":"1633095294017-9779664","shortbundleversion":"1.2.0","platformextension":"ios_segment","bundleIdentifier":"co.app.app"} 2021-10-05 10:32:21.205018+0200 app[17728:5762134] [AppsFlyerSDK] [com.apple.NSURLSession-delegate] [HTTP] 2021-10-05 10:32:21.294757+0200 app[17728:5760927] [AppsFlyerSDK] [afsdk-buffer-serial] [CACHE] Deleting file: /Users/adam/Library/Developer/CoreSimulator/Devices/60ED698A-C68E-4A37-AF43-AC54136D4531/data/Containers/Data/Application/42D3C6EA-2C23-4257-8C5B-E82841554265/Library/Caches/appsflyer-v1/655115540.6389.plist 2021-10-05 10:32:21.295715+0200 app[17728:5760927] [AppsFlyerSDK] [afsdk-buffer-serial] [HTTP] Dealloc. Time elapsed for: `16-1633422682.134353` - 0.2971359491348267 2021-10-05 10:37:14.658151+0200 app[17728:5754439] AppsFlyer Debug: handle deep link 2021-10-05 10:37:14.658435+0200 app[17728:5766587] [AppsFlyerSDK] [com.appsflyer.serial] Start 2021-10-05 10:37:14.658602+0200 app[17728:5766587] [AppsFlyerSDK] [com.appsflyer.serial] [CLS] ASIdentifierManager loaded 2021-10-05 10:37:14.658931+0200 app[17728:5766587] [AppsFlyerSDK] [com.appsflyer.serial] [CLS] ADClient not found 2021-10-05 10:37:14.659245+0200 app[17728:5766639] [AppsFlyerSDK] [com.appsflyer.serial] [CLS] FBSDKAppEventsUtility not found 2021-10-05 10:37:14.659420+0200 app[17728:5766639] [AppsFlyerSDK] [com.appsflyer.serial] isFirstLaunch: No, timestamp: 1633095313.879347 2021-10-05 10:37:14.659603+0200 app[17728:5766639] [AppsFlyerSDK] [com.appsflyer.serial] Time from last launch(session) 413.876750 2021-10-05 10:37:14.659756+0200 app[17728:5766639] [AppsFlyerSDK] [com.appsflyer.serial] `start` since background transition 2021-10-05 10:37:14.659937+0200 app[17728:5766639] [AppsFlyerSDK] [com.appsflyer.serial] `appsFlyerDevKey`: PZ*****jD 2021-10-05 10:37:14.843911+0200 app[17728:5766639] [AppsFlyerSDK] [com.appsflyer.serial] Looking for previous version date 2021-10-05 10:37:14.844078+0200 app[17728:5766639] [AppsFlyerSDK] [com.appsflyer.serial] Current cached application version: 1.2.0, new version: 1.2.0 2021-10-05 10:37:14.844254+0200 app[17728:5766591] [AppsFlyerSDK] [com.appsflyer.serial] Use date3 from storage 2021-10-05 10:37:14.844415+0200 app[17728:5766591] [AppsFlyerSDK] [com.appsflyer.serial] date1: 2021-10-01_153454+0200 2021-10-05 10:37:14.844568+0200 app[17728:5766591] [AppsFlyerSDK] [com.appsflyer.serial] date2: 2021-10-01_153454+0200 2021-10-05 10:37:14.844760+0200 app[17728:5766639] [AppsFlyerSDK] [com.appsflyer.serial] date3: 2021-10-01_153454+0200 2021-10-05 10:37:14.844911+0200 app[17728:5766639] [AppsFlyerSDK] [com.appsflyer.serial] First launch date: 2021-10-01_153513+0200 2021-10-05 10:37:14.845170+0200 app[17728:5766642] [AppsFlyerSDK] [com.appsflyer.serial] [SKAd] Times out. sk_exp = 1633181714.134963 2021-10-05 10:37:14.845420+0200 app[17728:5766595] [AppsFlyerSDK] [com.appsflyer.serial] NotDetermined 2021-10-05 10:37:14.906187+0200 app[17728:5766595] [AppsFlyerSDK] [com.appsflyer.serial] [CACHE] Caching request...(cache size: 0) 2021-10-05 10:37:14.914224+0200 app[17728:5766639] [AppsFlyerSDK] [afsdk-inner-buffer-serial] [HTTP] Operation start: `32-1633423034.843866` 2021-10-05 10:37:14.914787+0200 app[17728:5766639] [AppsFlyerSDK] [afsdk-inner-buffer-serial] <~+~ SEND Start: https://launches.appsflyer.com/api/v6.4/iosevent?app_id=1550127924&buildnumber=6.4.0 {"cell":{"mcc":"tv|sim","mnc":"tv|sim","ra":"tv|sim"},"uid":"1633095294017-9779664","bundlename":"Thriva","platformextension":"ios_segment","timestamp":"1633423034.843866","att_status":0,"platform":"x86_64","counter":"4","prev_session_dur":156,"reinstallCounter":"0","advertiserId":"","systemversion":"15.0","iaecounter":"1","JBDevice":false,"date3":"2021-10-01_153454+0200","deviceData":{"cpu_type":"ARM64","cpu_speed":"-1","osVersion":"99.9 (Build 99999)","ram_size":"999","cpu_64bits":"true","dim":{"y_px":2532,"x_px":1170},"device_model":"x86_64","cpu_count":"9"},"sc_o":"simulator","open_referrer":"","currentCountrycode":"US","systemname":"iOS","date1":"2021-10-01_153454+0200","localizedmodel":"iPhone","ivc":false,"af_events_api":"1","gcd_timing":2208,"bundleversion":"44","model":"iPhone","eventName":"Launched","dev_key":"PZF8JWiQAjScxZ9TL8YvjD","currentLanguage":"","wifi":false,"vendorId":"F9FB7EAB-7966-4BD3-847C-BAD9199337FD","eventvalue":"","serverApiVersion":"6.4","af_timestamp":"1633423034843","advertiserIdEnabled":false,"cksm_v1":"4190e11a1d05f4d0f61b18ca015b730e","ref":"db7329eef4753e02f2f61ae54182f260365b4da62dc7cab86fc41cde012bd3f8;0;0;0;0;0","af_iad_data":{"error":"ADClientErrorTrackingRestrictedOrDenied"},"event":"Launched","date1_2":"2021-10-01_153454+0200","disk":"999\/9999","sessioncounter":"2","load_framework_result":"NotDetermined","date2":"2021-10-01_153454+0200","firstLaunchDate":"2021-10-01_153513+0200","originalAppsflyerId":"1633095294017-9779664","shortbundleversion":"1.2.0","timepassedsincelastlaunch":"414","bundleIdentifier":"co.app.app"} 2021-10-05 10:37:15.716582+0200 app[17728:5766649] [AppsFlyerSDK] [com.apple.NSURLSession-delegate] [HTTP] 2021-10-05 10:37:15.716944+0200 app[17728:5766651] [AppsFlyerSDK] [com.apple.NSURLSession-delegate] Loading conversion data 2021-10-05 10:37:15.717131+0200 app[17728:5766651] [AppsFlyerSDK] [com.apple.NSURLSession-delegate] [GCD-A02] -[RNAppsFlyer onConversionDataSuccess:]: 2021-10-05 10:37:15.816603+0200 app[17728:5766642] [AppsFlyerSDK] [afsdk-buffer-serial] [CACHE] Deleting file: /Users/adam/Library/Developer/CoreSimulator/Devices/60ED698A-C68E-4A37-AF43-AC54136D4531/data/Containers/Data/Application/42D3C6EA-2C23-4257-8C5B-E82841554265/Library/Caches/appsflyer-v1/655115834.9061.plist 2021-10-05 10:37:15.817183+0200 app[17728:5766649] [AppsFlyerSDK] [afsdk-buffer-serial] [HTTP] Dealloc. Time elapsed for: `32-1633423034.843866` - 0.9029359817504883 ```
amit-kremer93 commented 2 years ago

Hi @adamTrz Thank you for reaching out to us. Our SDK is not responsible for showing the ATT popup. Be sure you implemented it correctly without any conditions or similar.

adamTrz commented 2 years ago

Hi @adamTrz Thank you for reaching out to us. Our SDK is not responsible for showing the ATT popup. Be sure you implemented it correctly without any conditions or similar.

Hi @amit-kremer93 Initialization is done without any conditions or similar

ge-af commented 2 years ago

Hi @adamTrz

According to Apple's documentation, the ATT popup will be invoked on this scenarios:

Even though the AppTrackingTransparency framework is not being handled inside our SDK we will try to assist as much as possible.

If you seem to meet all of this conditions mentioned above and the issue persist, we would kindly ask you to submit a ticket to support@appsflyer.com to provide optimal support. When submitting the ticket, please specify your AppsFlyer sign-up (account) email, app ID, reproduction steps, code snippets, logs, the links you used, and any additional relevant information.

LouisJS commented 2 years ago

Is the SDK triggering the ATT popup by itself or should we implement it manually ?