Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

onDynamicLinkCallback is never called #1543

Open
AntJW opened this issue Jan 30, 2020 · 9 comments
Open

onDynamicLinkCallback is never called #1543

AntJW opened this issue Jan 30, 2020 · 9 comments

Comments

@AntJW
Copy link

AntJW commented Jan 30, 2020

Hi,

I set up Email-Link login and Dynamic Links. After clicking the link in received email from auth, the app opens, but while observing the log output, onDynamicLinkCallback is never called and therefore I cannot route the user accordingly. This is especially problematic if users click on the same email link, because the Email-Link seems to expire after the first click (as it should IMO). I would need to route and/or notify users in the case they are logged in our not after clicking the link, but I cannot do this if onDynamicLinkCallback is never called. I am currently testing with a physical ios device (version 13.3). Please help.

firebase.init({
    onDynamicLinkCallback: function (result) {
      console.log("Dynamic Link: " + result.url+ ", matchConfidence: "+ result.matchConfidence); 
    }
  });

It looks like this issue may be related to the TODO item you noted regarding the "data" param here. Can someone confirm?

@AntJW
Copy link
Author

AntJW commented Jan 30, 2020

Hi @EddyVerbruggen, I thought is issue is important enough to ping you directly. Forgive me if this is not the right procedure.

@maxorlovsky
Copy link

Experienced same bug on iOS onDynamicLinkCallback and addOnDynamicLinkReceivedCallback is not getting triggered, on Android works fine.
Even though configuration seems fine.

@maxorlovsky
Copy link

Checked this https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/master/src/firebase.d.ts#L166-L170
Unfortunately even alternative, which is addOnDynamicLinkReceivedCallback, does not work

@EddyVerbruggen
Copy link
Owner

It would be extremely useful to have this reproduced in a small demo app.

@juanpicuervo
Copy link

Hi, its happening to me too! It never calls onDynamicLinkCallback :(

@manojdcoder
Copy link

@juanpicuervo Please share a sample project where issue can be reproduced.

@erkanarslan
Copy link

I am not an iOS expert but it seems that this problem occurs when the app or another plugin defines a custom App Delegate.

When my app starts, onDynamicLinkCallback is not called but applicationOpenURLOptions function in the app delegate is called and I can get url from that.

@davidmhHuenei
Copy link

Any solution?

@befirst
Copy link

befirst commented Aug 27, 2020

@erkanarslan is right:
hypery2k/nativescript-urlhandler#88 (comment)

For anyone that would be still stuck with this : the plugin is working, even with iOS 13. The problem is related to plugins conflicts. In my case, for instance, it was related to nativescript-plugin-firebase, which overrides the "UIApplicationDelegate" to insert its own callback. Both nativescript-plugin-firebase and this plugins uses the same approach to catch the "open app from url" event. The plugins maintainers should align themselves and find a way to listen for AppDelegate events without conflicting with each others. The same problem occurs with the nativescript-facebook plugin.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants