AppsFlyerSDK / appsflyer-cordova-plugin

AppsFlyer plugin for Cordova
MIT License
37 stars 71 forks source link

onInstallConversionDataListener is not triggered #166

Closed suyundukov closed 3 years ago

suyundukov commented 3 years ago

Report

Plugin Version

6.2.60

On what Platform are you having the issue?

Capacitor: 2 iOS: 14.5+ only, everything works like a charm on 14.4 and lower. Xcode: 12.5

What did you do?

Followed instructions from https://github.com/AppsFlyerSDK/appsflyer-cordova-plugin/blob/master/docs/Guides.md, except ATT pop-up, I don't need IDFA.

Plugin is initialised like this:

window.plugins.appsFlyer.initSdk({
  appId: <APP_ID_HERE>,
  isDebug: true,
  devKey: <DEV_KEY_HERE>,
  onInstallConversionDataListener: true,
}, console.log, console.error); // neither `console.log` nor `console.error` are fired

What did you expect to happen?

onInstallConversionDataListener to have its callback called.

What happened instead?

Nothing. Neither success nor error callbacks are fired, but it works perfectly on iOS 14.4 version with same configuration (same Xcode, same code, same plugin version).

Please provide any other relevant information.

Logs from Xcode ```logs To Native Cordova -> AppsFlyerPlugin registerOnAppOpenAttribution AppsFlyerPlugin195409591 ["options": []] To Native Cordova -> AppsFlyerPlugin initSdk AppsFlyerPlugin195409592 ["options": [{ appId = ; devKey = ; isDebug = 1; onInstallConversionDataListener = 1; waitForATTUserAuthorization = 0; }]] AppsFlyer SDK version 6.2.6 started build (80); 2021-05-17 17:57:54.728642+0300 TestApp[51120:4842991] [DEBUG] AppsFlyer: * AppsFlyer is set to debug mode. This should only be used in development environment! * Keychain items migration status: 0 2021-05-17 17:57:54.729075+0300 TestApp[51120:4842991] [DEBUG] AppsFlyer: ASIdentifierManager loaded 2021-05-17 17:57:54.729257+0300 TestApp[51120:4842991] [DEBUG] AppsFlyer: ADClient not found 2021-05-17 17:57:54.729390+0300 TestApp[51120:4842991] [DEBUG] AppsFlyer: CTTelephonyNetworkInfo loaded 2021-05-17 17:57:54.729533+0300 TestApp[51120:4842991] [DEBUG] AppsFlyer: FBSDKAppEventsUtility loaded 2021-05-17 17:57:54.729706+0300 TestApp[51120:4842991] AppsFlyer Debug: handle deep link 2021-05-17 17:57:54.745286+0300 TestApp[51120:4843418] [DEBUG] AppsFlyer: [HTTP] Operation start: `SKAD-8ACB23BE-50D8-4DC0-9E8C-7F470045E20F` 2021-05-17 17:57:54.745630+0300 TestApp[51120:4843418] [DEBUG] AppsFlyer: [SKAd] URL: https://skadsdk.appsflyer.com/api/v1.0/rules?uid=1621263454540-2318016&app_id=¤cy=USD 2021-05-17 17:57:54.746115+0300 TestApp[51120:4843470] [DEBUG] AppsFlyer: Dynamically loaded library: AppTrackingTransparency 2021-05-17 17:57:54.746430+0300 TestApp[51120:4843470] [DEBUG] AppsFlyer: Start 2021-05-17 17:57:54.746634+0300 TestApp[51120:4843470] [DEBUG] AppsFlyer: isFirstLaunch: Yes, timestamp: (null) 2021-05-17 17:57:54.746886+0300 TestApp[51120:4843470] [DEBUG] AppsFlyer: First `start` since application termintaion/installation 2021-05-17 17:57:54.747072+0300 TestApp[51120:4843470] [DEBUG] AppsFlyer: `appsFlyerDevKey`: hJ*****s4 2021-05-17 17:57:54.749229+0300 TestApp[51120:4843470] [DEBUG] AppsFlyer: Installation detected 2021-05-17 17:57:54.750951+0300 TestApp[51120:4843470] [DEBUG] AppsFlyer: Looking for previous version date 2021-05-17 17:57:54.751593+0300 TestApp[51120:4843470] [DEBUG] AppsFlyer: Current cached application version: (null), new version: 1.0 2021-05-17 17:57:54.751976+0300 TestApp[51120:4843470] [DEBUG] AppsFlyer: First AppsFlyer SDK launch or new version detected 2021-05-17 17:57:54.754558+0300 TestApp[51120:4843470] [DEBUG] AppsFlyer: date1: 2021-05-17_175734+0300 2021-05-17 17:57:54.755034+0300 TestApp[51120:4843470] [DEBUG] AppsFlyer: date2: 2021-05-17_175753+0300 2021-05-17 17:57:54.755469+0300 TestApp[51120:4843470] [DEBUG] AppsFlyer: date3: 2021-05-17_175753+0300 2021-05-17 17:57:54.755982+0300 TestApp[51120:4843470] [DEBUG] AppsFlyer: Generate first launch date: 2021-05-17_175754+0300 2021-05-17 17:57:54.756797+0300 TestApp[51120:4843470] [DEBUG] AppsFlyer: First launch date: 2021-05-17_175754+0300 2021-05-17 17:57:54.757929+0300 TestApp[51120:4843470] [DEBUG] AppsFlyer: iAD: iSearchAdsDict is nil 2021-05-17 17:57:54.758534+0300 TestApp[51120:4843470] [DEBUG] AppsFlyer: [SKAd] Loaded configuration: 2 2021-05-17 17:57:54.759052+0300 TestApp[51120:4843470] [DEBUG] AppsFlyer: [SKAd] No SKAdRule found 2021-05-17 17:57:54.759311+0300 TestApp[51120:4843470] [DEBUG] AppsFlyer: Get install receipt 2021-05-17 17:57:54.759993+0300 TestApp[51120:4843470] [DEBUG] AppsFlyer: Install receipt: {"message":"appStoreReceiptURL does not exists.","data":"-1"} 2021-05-17 17:57:54.761105+0300 TestApp[51120:4843470] [DEBUG] AppsFlyer: NotDetermined 2021-05-17 17:57:54.761843+0300 TestApp[51120:4843470] [DEBUG] AppsFlyer: [CACHE] Caching request...(cache size: 0) 2021-05-17 17:57:55.047431+0300 TestApp[51120:4843470] [DEBUG] AppsFlyer: [SKAd] Rule written: { "sk_exp" = "1621349875.047312"; "sk_rules" = { di = 1; ex = 1; wi = 24; }; } 2021-05-17 17:57:55.049306+0300 TestApp[51120:4843470] [DEBUG] AppsFlyer: [SKAd] didReceiveConfiguration: 255 2021-05-17 17:57:55.050011+0300 TestApp[51120:4843628] [DEBUG] AppsFlyer: [HTTP] Dealloc. Time elapsed for: `SKAD-8ACB23BE-50D8-4DC0-9E8C-7F470045E20F` - 0.3044990301132202 2021-05-17 17:57:55.050550+0300 TestApp[51120:4843418] [DEBUG] AppsFlyer: [HTTP] Operation start: `800-1621263474.757395` 2021-05-17 17:57:55.440200+0300 TestApp[51120:4843418] [DEBUG] AppsFlyer: Dynamically loaded library: AdServices 2021-05-17 17:57:55.895061+0300 TestApp[51120:4843627] [DEBUG] AppsFlyer: Dynamically loaded library: iAd 2021-05-17 17:57:55.914624+0300 TestApp[51120:4843627] [DEBUG] AppsFlyer: [iAD]: Will send to attr: 1 Apple Search Ads: { error = ADClientErrorTrackingRestrictedOrDenied; } 2021-05-17 17:57:55.914920+0300 TestApp[51120:4843627] [DEBUG] AppsFlyer: `appsFlyerDevKey`: hJ*****s4 2021-05-17 17:57:55.916542+0300 TestApp[51120:4843627] [DEBUG] AppsFlyer: Looking for previous version date 2021-05-17 17:57:55.916702+0300 TestApp[51120:4843627] [DEBUG] AppsFlyer: Current cached application version: 1.0, new version: 1.0 2021-05-17 17:57:55.916836+0300 TestApp[51120:4843627] [DEBUG] AppsFlyer: Use date3 from storage 2021-05-17 17:57:55.916951+0300 TestApp[51120:4843627] [DEBUG] AppsFlyer: date1: 2021-05-17_175734+0300 2021-05-17 17:57:55.917048+0300 TestApp[51120:4843627] [DEBUG] AppsFlyer: date2: 2021-05-17_175753+0300 2021-05-17 17:57:55.917151+0300 TestApp[51120:4843627] [DEBUG] AppsFlyer: date3: 2021-05-17_175753+0300 2021-05-17 17:57:55.917250+0300 TestApp[51120:4843627] [DEBUG] AppsFlyer: First launch date: 2021-05-17_175754+0300 2021-05-17 17:57:55.918065+0300 TestApp[51120:4843627] [DEBUG] AppsFlyer: NotDetermined 2021-05-17 17:57:55.918568+0300 TestApp[51120:4843627] [DEBUG] AppsFlyer: [CACHE] Caching request...(cache size: 1) ```
DontGiveAFck commented 3 years ago

@nurlansu Does registerDeepLink work for you on 'cold' app start? When app installed but not launched.

pazlavi commented 3 years ago

Hi @nurlansu, Thank you for reaching out to us. Can you please confirm that you tested using Xcode 12.5 and a simulator? (not using a physical device)

suyundukov commented 3 years ago

Does registerDeepLink work for you on 'cold' app start? When app installed but not launched.

@DontGiveAFck Sorry, I don't know how to check if it runs when installed but not launched. It runs when launched and I get this JSON:

{
    "status": "failure",
    "deepLinkStatus": "NOT_FOUND",
    "data": "deep link not found",
    "type":"onDeepLinkListener"
}

Can you please confirm that you tested using Xcode 12.5 and a simulator? (not using a physical device)

Hi @pazlavi. Yes, I'm using Xcode 12.5 and a simulator.

pazlavi commented 3 years ago

Hi @nurlansu ,

Thank you for the response.

We aware of an issue with Apple's API [AAAttribution attributionTokenWithError:] that may block our SDK on certain simulators' images. As per our internal tests, iPhone 12 and iPhone 12 pro max simulators are not affected by this issue. Please try using these simulators for now

suyundukov commented 3 years ago

iPhone 12 and iPhone 12 pro max simulators are not affected by this issue

Works as expected on iPhone 12 Pro Max, but not on iPhone 12.

Thank you for your help.

Closing the issue then. Feel free to reopen if needed.