AppsFlyerSDK / appsflyer-cordova-plugin

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

window.handleOpenURL is no longer invoked since 6.3.0 #174

Closed David-sanderson closed 2 years ago

David-sanderson commented 2 years ago

Report

Cordova's window.handleOpenURL method is no longer being invoked in JS since the deep link listener was added in 6.3.0. Even in the latest update 6.3.20 with the addition of AppsFlyerDisableDeepLinks set to 1(true) the functionality is not restored. This is down to the fact that the AppsFlyerX+AppController.m is extending the class and replacing the functionality so the basic functionality is no longer being invoked.

Plugin and Platform Versions

Appsflyer Cordova version: 6.3.20 Cordova-iOS: 5.1.0 Cordova: 9.0.0

On what Platform are you having the issue?

iOS

What did you do?

Installed the 6.3.20 plugin using Cordova and attempted to access the deep links from JS.

What did you expect to happen?

window.handleOpenURL should still be invoked regardless of AppsFlyerDisableDeepLinks value

What happened instead?

window.handleOpenURL is not invoked regardless of what value AppsFlyerDisableDeepLinks is set too

Please provide any other relevant information.

From my understanding AppsFlyerDisableDeepLinks was added to prevent conflict with @ionic-native/deeplinks. The standard Cordova implementation is still effected by this change. Cordova does have some notification centre methods that might be of use and better suited for AppsFlyer without effecting the original implementation. But only if ionic also supports this:

[[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]];

[[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLWithAppSourceAndAnnotationNotification object:openURLData]];

Alternatively it would be nice if the overrides were to invoke the supers method to keep the original implementation somehow so that both automatic deep linking and window.handleOpenURL still worked.

pazlavi commented 2 years ago

Hi @David-sanderson , Thank you for reaching out to us.

We already aware of this issue and will release a fix in the upcoming version. However, we don't have an ETA for this release yet. Please feel free to contact our support team at support@appsflyer.com, and they will guide you on how to handle this issue for now.