AppsFlyerSDK / AppsFlyerFramework

AppsFlyer Apple SDK
https://support.appsflyer.com/hc/en-us/articles/207032066-AppsFlyer-SDK-Integration-iOS
Other
170 stars 92 forks source link

Deferred Deeplinks handled before Network access is granted #293

Closed emartinson closed 3 months ago

emartinson commented 3 months ago

Report

I'm implementing deferred deep links. The issue is when I launch app for the first time I'm prompted to allow network access, but AppsFlyerSDK tries to check Deeplinks only once on app launch and does this before I can allow access to internet.

After access is granted - no retry calls is made by AppsFlyer. It'd be better to allow user to force request check for deffered deeplink manually or don't do any deeplink checks unitl SDK is started.

It's mentioned in https://dev.appsflyer.com/hc/docs/dl_ios_unified_deep_linking#deferred-deep-linking-after-network-consent but this doesn't work actually.

SDK Version

6.14.3

What did you do?

  1. Configure SDK with API Key
  2. DO NOT start SDK
  3. Wait until internet connection is available
  4. When Internet connection is available - start AppsFlyer SDK

What did you expect to happen?

I expect AppsFlyerSDK to perform all deeplinks logic AFTER I call AppsFlyerLib.shared().start() or at least perform re-fetch deeplinks after start, but not automatically right after app launch.

OR AppsFlyerSDK can handle internet connection change monitoring and send events only after network is available without firing didResolveDeepLink with error result.

What happened instead?

Deeplink resolving started before AppsFlyerLib.shared().start(). No further re-fetch of deferred deeplinks after AppsFlyerLib.shared().start().

Please provide any other relevant information.

🟦 MarketingAnalyticsService:36 init (): [Marketing][AppsFlyer] SDK Initialized with api key: ###, but not started yet!
⬛️ AppCoordinator:396 didResolveDeepLink (_:): [DeepLink][AppsFlyer] didResolveDeepLink: <AppsFlyerDeepLinkResult: 0x302bfb120>
πŸŸ₯ AppCoordinator:402 didResolveDeepLink (_:): [DeepLink][AppsFlyer] error: Error Domain=com.appsflyer.sdk.network Code=0 "Request failed" UserInfo={NSLocalizedDescription=Request failed, NSUnderlyingError=0x3022ab300 {Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." UserInfo={_kCFStreamErrorCodeKey=50, NSUnderlyingError=0x3022882d0 {Error Domain=kCFErrorDomainCFNetwork Code=-1009 "(null)" UserInfo={_kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=50, _NSURLErrorNWResolutionReportKey=Resolved 0 endpoints in 0ms using unknown from cache, _NSURLErrorNWPathKey=unsatisfied (Denied over cellular interface), interface: pdp_ip0[lte], ipv4, dns, expensive, uses cell}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <C914C10E-4C83-4CFF-8FEB-C8086AB412A0>.<5>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
🟨 AppCoordinator:26 checkInternetConnection (isAvailable:): [Reachability][Trottled][DeepLink][AppsFlyer] Connection changed, isAvailable: true
⬛️ AppCoordinator:38 checkInternetConnection (isAvailable:): [Reachability][Marketing][DeepLink][AppsFlyer] Starting AppsFlyerSDK!
github-actions[bot] commented 3 months ago

πŸ‘‹ Hi @emartinson and Thank you for reaching out to us. In order for us to provide optimal support, please submit a ticket to our support team at support@appsflyer.com. When submitting the ticket, please provide:

emartinson commented 3 months ago

Is it ok to close issue without resolution?