-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[firebase_dynamic_links] Not working on app start #100
Comments
@MaciDE Have you found a way to fix this issue or a workaround? |
Currently, I am calling
|
I've pushed a PR with the fix, can you try? You just need to point to the PR version.
|
I'll try it next week. So far it looks pretty promising :) |
@jherencia will test the PR tomorrow. |
@jherencia Your PR solves my issues! Been tinkering with this for 3 days straight, thanks so much! |
@jherencia I can confirm your PR fix the problem on iOS when app is in "killed state" |
@jherencia Yep, seems like your PR fixes the issue. Thank you! |
I just realize it is not working when app is installed for the first time by touching a dynamic link... getInitialLink() is returning always null. Did anyone solve this? |
@quetool did not try it trough the App Store yet |
@HofmannZ doesn't matter app store, you can simulate app installation by running the project without the app installed. The steps are...
Dynamic link should work after installation (like in Android do) |
It seems to be an old iOS issue firebase/firebase-ios-sdk#1244 (comment) |
@jherencia After extensively testing your PR, I can confirm that your fix is working as expected. The dynamic link is now working when the (closed) App is opened through a dynamic link without delaying the call of |
Great to hear, thank you! |
@MaciDE yep, the issue I have is when using custom domains... Using default domains like page.link is quite ugly for marketing campaigns... I will try to find a solution... |
I think that in that case (with custom domains) the problem is not related with this library, it's probably related to something wrong in the configuration. |
@jherencia that's right, I checked with original version of the plugin and with your PR, none of them worked out in this case... Seems to be an old firebase issue, maybe some methods are missings in the iOS side of the plugin, don't really know.... |
So, I finally find a solution. Pretty dumb indeed... The problem was somehow AppDelegate.m in my project was created (automatically or not, don't really know) with
The first one in order to work with customs schemes, and the second one because for some reason This is AppDelegate.m now
So now I have Dynamic Links fully functional both on iOS and Android thanks to @jherencia with his PR and some research on my own :P I hope it helps someone in the future... |
So what is going on with this issue? Looks like the pr by @jherencia is also in an unsettled state. |
I've updated the PR, fireabase_dynamic_links 0.5.0+4 was officially published so the new valid version from my repo is:
|
@jherencia Looking forward to see your pr getting merged and a new version released. It only takes someone authorized pressing the merge button... :) |
@jherencia what did you do in this PR? |
@jherencia thanks! |
Any updates on this ? It's been a long time |
Any update on this? The delayed init seems not to be working either |
Temporary fix
|
Description: Fixing race-condition with getInitialLink and actuall setup this initial link on iOS devices Closes: firebase#100 Closes: firebase#1847 Closes: firebase#1861
Description: Fixing race-condition with getInitialLink and actuall setup this initial link on iOS devices Closes: firebase#100 Closes: firebase#1847 Closes: firebase#1861
Doesn't this commit already fix this issue f4289e2? |
It seems this issue is back with firebase_dynamic_links: ^0.6.0+2 Behaviour: The app is properly started by clicking the link, however, Conclusion: This indicates that the race condition still prevails and the bug is not properly fixed by the pull request #255. I tried all the above workarounds, non of it seems to work: (1) delay
(2) Calling in main after
I also realised that in a recent commit the order has changed, now the example first calls I tested a custom dynamic link and also the Firebase Auth Email link, same behaviour, All tested on physical device. Android works perfectly. My Flutter version
Happy to do further debugging and diving deeper if someone can give me indications/directions what to do to pinpoint this recurring issue. |
@jherencia from going through the discussion above it looks like that #255 should have fixed it as mentioned by @tapizquent, which seems to be merged back. There is also a note in the release notes. So what is the status? |
I tested Christian's @hffmnn pull request #2580
This seems to fix the issue at least in my setup. As this is a recurring issue open now for a year can someone with the authority press the merge button? Thanks. |
@degloff I think there's a common misunderstanding of how the
The initial link may just as well be delivered to the So if you first install the |
@koskimas thanks for the reply. I observed exactly that change in the 0.6.0 version and i checked it carefully. I commented already on this in my previous comment.
But it does NOT solve the problem! Also onLink does not fire. |
Works for me every single time on multiple different devices. I think you'll need to show a reproducible example of the fail for people to take this seriously. |
@koskimas our app startup sequence is quite complex including some more exotic things like WeChat and Line plugin. This may cause a situation that is unique. All I can confirm is that @hffmnn solution works so far always, whereas the suggested approach is only working in less than 10%. Quite a puzzle. |
@koskimas Thank you! This comment helps me.
I had been falling to get initial link,
but solved by swaping
|
This question has been bothering me all day. Finally ,my code like this:
|
I'm going to close this as I believe this comment captures the misconception perfectly. Please do not rely on the |
Describe the bug
When opening an iOS App from a dynamic link the initialLink is nil.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
App should open and getInitialLink() should return the correct dynamic link.
Additional context
From my understanding there is an issue when reacting to the incoming
UserActivity
.onInitialLink
is correctly called but returns way earlier thanself.initialLink
is set in the completion block from[[FIRDynamicLinks dynamicLinks]handleUniversalLink: completion: ]
. Therefore on handling the method callFirebaseDynamicLinks#getInitialLink
[self getInitialLink]
returnsnil
and because ofself.flutterError
also being nil theresult
returns just withnil
.The text was updated successfully, but these errors were encountered: