AppsFlyerSDK / appsflyer-flutter-plugin

Flutter Plugin for AppsFlyer SDK
MIT License
142 stars 111 forks source link

iOS Deferred Deep Link Issue: Unable to Retrieve Deep Link Value #307

Open nitaking opened 3 months ago

nitaking commented 3 months ago

Objective

I am currently encountering an issue with retrieving deep link values via deferred deep links on iOS. According to the AppsFlyer SDK documentation for Flutter, the SDK should be triggered by either iOS Universal Links/Android App Links for deep linking or deferred deep links.

My question revolves around which listener should be used for deferred deep links: onInstallConversionData or onDeepLinking? Based on my understanding, utilizing Unified Deep Linking (UDL) implies that onDeepLinking should be capable of handling all related events. However, in my application, the onDeepLinking listener either does not trigger, or it fails to retrieve the deep_linking_value.

I am wondering if there might be an issue with how I've implemented the SDK or if there are specific aspects I should verify.

Points of Uncertainty

  1. On iOS, it appears that the onDeepLinking callback is not being listened to.
  2. While onInstallConversionData does trigger for deferred deep links, it fails to capture the deep_linking_value.

Configuration and Background

Any insights or guidance on resolving these issues would be greatly appreciated.

github-actions[bot] commented 3 months ago

👋 Hi @nitaking 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 specify:

lashket commented 3 months ago

Hello @nitaking

I have the same issue on iOS. Please let me know how it turned out for you, in turn, I’ll also let you know if everything works out

justatipfromthedeadsequoiatree commented 2 months ago

Hi @nitaking @lashket

Any update on this issue?

OnDeepLinking was called when I used the OneLink, and it's working fine on Android devices. However, OnDeepLinking is not called on iOS devices.

ianoliveira12 commented 2 months ago

I have same problem in IOS.

JSBmanD commented 2 months ago

I have the same problem in iOS and Android.

SuhwanCha commented 2 months ago

Hello @nitaking , Do you have any updates in this issue? I have some problem in iOS (6.13.2+1)

justatipfromthedeadsequoiatree commented 2 months ago

Hi @nitaking @lashket

Any update on this issue?

OnDeepLinking was called when I used the OneLink, and it's working fine on Android devices. However, OnDeepLinking is not called on iOS devices.

I was able to get the callback from _appsflyerSdk.onDeepLinking() on iOS

Steps to trigger

  1. press on the OneLink that you have configured from the appsflyer website
  2. it should open web browser if your apps is still not yet published, and it should open App Store or Play Store if your app have been published
  3. Here is the tricky part. DO NOT install the app from web browser, App Store or Play store. Instead run your app from your IDE or Xcode and remember to set showDebug to true in your AppsFlyerOptions. Let your app run until it launched.
  4. Check your IDE log, there should be a callback triggered from _appsflyerSdk.onDeepLinking() with Status.FOUND
SuhwanCha commented 2 months ago

@justatipfromthedeadsequoiatree Thank you for description. So do you mean you can get data from onDeepLinking() on IOS, even in deferred deeplink? In my case, onDeepLinking cannot retrieve data(include any schemes too) when application is first opened with OneLink. So, I used app_links package to handle that case.

justatipfromthedeadsequoiatree commented 2 months ago

@justatipfromthedeadsequoiatree Thank you for description. So do you mean you can get data from onDeepLinking() on IOS, even in deferred deeplink? In my case, onDeepLinking cannot retrieve data(include any schemes too) when application is first opened with OneLink. So, I used app_links package to handle that case.

hi @SuhwanCha

Q: So do you mean you can get data from onDeepLinking() on IOS, A: Yes, i'm using Unified deep linking in this situation, onDeepLinking() got triggered when i perform the steps i mentioned above here

source from documentation

data printed on my IDE console

DeepLink: {"af_sub4":"","click_http_referrer":"","af_sub1":"","af_sub3":"","deep_link_value":"dummy_text","campaign":"","match_type":"probabilistic","af_sub5":"","campaign_id":"","media_source":"","af_sub2":"","is_deferred":true}

Q: even in deferred deeplink? A: yes, onInstallConversionData callback got triggered as well when i perform the steps i mentioned above. here As stated in the documentation, when using Deferred Deep Linking , onInstallConversionData() will get triggered .

source from documentation

data printed inside my IDE console

onInstallConversionData res: => {status: success, payload: {is_first_launch: true, install_time: 2024-04-17 15:34:09.906, af_message: organic install, af_status: Organic}}

hope it helps, regards

SuhwanCha commented 2 months ago

Thank you @justatipfromthedeadsequoiatree, I've reproduced steps on iOS, as you mentioned before.

I can get data from onInstallConversionData

onInstallConversionData: {status: success, payload: {is_first_launch: false, install_time: 2024-04-18 02:31:18.500, af_message: organic install, af_status: Organic}}

and onDeepLinking

{scheme: MY_BUNDLE_ID, request_ip_version: IP_V4, is_deferred: false, host: google, link: BUNDLE_ID://google/link/?request_ip_version=IP%5FV4&match_message=No%20pre%2Dinstall%20link%20matched%20for%20this%20device%2E, path: /link, match_message: No pre-install link matched for this device.}

But data such as deep_link_value is missing.

When UDL returns FOUND but the deep linking data is missing parameters, which are not deep_link_value and deep_link_sub1-10.

https://dev.appsflyer.com/hc/docs/dl_ios_ocds_ddl

justatipfromthedeadsequoiatree commented 2 months ago

Thank you @justatipfromthedeadsequoiatree, I've reproduced steps on iOS, as you mentioned before.

I can get data from onInstallConversionData

onInstallConversionData: {status: success, payload: {is_first_launch: false, install_time: 2024-04-18 02:31:18.500, af_message: organic install, af_status: Organic}}

and onDeepLinking

{scheme: MY_BUNDLE_ID, request_ip_version: IP_V4, is_deferred: false, host: google, link: BUNDLE_ID://google/link/?request_ip_version=IP%5FV4&match_message=No%20pre%2Dinstall%20link%20matched%20for%20this%20device%2E, path: /link, match_message: No pre-install link matched for this device.}

But data such as deep_link_value is missing.

When UDL returns FOUND but the deep linking data is missing parameters, which are not deep_link_value and deep_link_sub1-10.

https://dev.appsflyer.com/hc/docs/dl_ios_ocds_ddl

hi @SuhwanCha

i have updated my post on onDeepLinking(). I managed to get the deep_link_value.

Maybe you need to check back your configuration on appsflyer website?