AppsFlyerSDK / appsflyer-flutter-plugin

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

onDeepLinking DeepLinkResult "NOT_FOUND" on iOS #325

Open AILIKE-ME opened 1 week ago

AILIKE-ME commented 1 week ago

Describe the bug We implemented deferred deep linking on Android and iOS about one and a half months ago. After some updates, the deferred deep linking is not working on iOS, whereas it is working well on Android. Specifically, the onDeepLinking function consistently gives DeepLinkResult with the status of "NOT_FOUND". The onInstallConversionData gives some valid information that implies the connection between the app and the server is not lost. We think it might be related to recent updates, but we have not figured it out yet. How can we resolve this?

Here is the code for the deferred deep linking we implemented.

Future<void> initializeAppsflyer() async {
  var appsFlyerOptions = AppsFlyerOptions(
      afDevKey: 'DevKey', appId: 'AppID', showDebug: true);

  AppsflyerSdk appsflyerSdk = AppsflyerSdk(appsFlyerOptions);

  appsflyerSdk.onInstallConversionData((result) {
    print("Conversion data: " + result.toString());
    if (result['status'] == 'success') {
      handleDeepLinkData(result['deep_link']);
    }
  });

  appsflyerSdk.onAppOpenAttribution((result) {
    print("Open attribution: " + result.toString());
    handleDeepLinkData(result);
  });

  appsflyerSdk.onDeepLinking((DeepLinkResult dp) {
    print("Deep Link Result: " + dp.toString());
    if (dp.status == Status.FOUND && dp.deepLink != null) {
      print("dp.deeplink : ${dp.deepLink}");
      print("dp.deeplink.deeplinkvalue : ${dp.deepLink!.deepLinkValue}");
      handleDeepLinkData(dp.deepLink);
    }
  });

  await appsflyerSdk.initSdk(
      registerConversionDataCallback: true,
      registerOnAppOpenAttributionCallback: true,
      registerOnDeepLinkingCallback: true);
}

Expected behavior Get DeepLinkResult with the status of "FOUND"

Smartphone (please complete the following information):

Additional context appsflyer_sdk version: 6.13.0+2 flutter version: 3.22.2

528564233 commented 2 days ago

有解决吗 我这边ios深度连接可以打开app但是不走onDeepLinking 第一次安装有进 ,之后打开就不进了