I have downloaded the example app from https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_dynamic_links/example.
This example is running fine on android but on ios it is doing nothing when app is in background.
In fact onLink method was never called when ios app is in background.
HELP me please.
I'm going to try to check this this week.
EDIT: Finally I will be able to check this next week: September 23-29
I've pushed a PR with the fix, can you try? You just need to point to the PR version?
firebase_dynamic_links:
git:
url: https://github.com/mrmilu/flutterfire.git
path: packages/firebase_dynamic_links
ref: firebase_dynamic_links-0.5.0+4
I've pushed a PR with the fix, can you try? You just need to point to the PR version?
firebase_dynamic_links: git: url: https://github.com/mrmilu/flutterfire.git path: packages/firebase_dynamic_links ref: firebase_dynamic_links-0.5.0+4
I don't know what @dhanrajvermaRepo means with "when app is in background" because, in order to open a Dynamic link from somewhere else, your app needs to be in background for sure, so...
Anyway, it is not working at all on iOS. App is being called and opened just fine, but the listener is not being called...
And not, @jherencia, your fix is not working, at leas not for me...
So I opened another issue https://github.com/FirebaseExtended/flutterfire/issues/262
@quetool
As you pointed in the other issue (#262) you are using a custom domain, and when you configured correctly the Info.plist file, everything worked.
Does that mean that the my PR worked for you?
@jherencia sorry, I didn't notice you were talking about default domains... I didn't try again your PR after I solved my issue like I said in in https://github.com/FirebaseExtended/flutterfire/issues/262
So, we need to wait for @dhanrajvermaRepo to answer that...
@quetool
So you were using the latest official version (0.5.0+3) not the PR when it worked, right?
That's right
Managed to get it working, though it's still subscribing to onLink multiple times, because I can't dispose the listener upon unmount. Would be good to get the listener back from channel.
Also note that
Navigator.pushNamed(context, deepLink.path);
needs to be a child of MaterialApp to work.
I've pushed a PR with the fix, can you try? You just need to point to the PR version?
firebase_dynamic_links: git: url: https://github.com/mrmilu/flutterfire.git path: packages/firebase_dynamic_links ref: firebase_dynamic_links-0.5.0+4
I'll test my App on 8 October and let you know whether it is working or not.
Thank you
I've pushed a PR with the fix, can you try? You just need to point to the PR version?
firebase_dynamic_links: git: url: https://github.com/mrmilu/flutterfire.git path: packages/firebase_dynamic_links ref: firebase_dynamic_links-0.5.0+4
Hi, I have tested my app with this PR. It is working when app is in background. When app is in killed state it navigates to appropriate screen but returns to my root widget within a micro/millisecond. It is so fast that it seems it directly opens my root widget (root screen ie login screen). I have is used toast to debug this issue as in killed state i can not debug it.
Android working fine in all cases.
Can you post some example code to reproduce this?
Can you post some example code to reproduce this?
I am sorry.
PR is working fine in both android and iOS. There was a bug in my code.
Thank you very much.
Great to hear, thank you!
Great to hear, thank you!
But one thing i forgot to mention is that in every state(Active/background, killed) onLink method's onSuccess callback is called on iOS. But in android on Active/background state onLink method's onSuccess is called and in killed state getInitial link returns deepLink.
May I release my App with this PR?
@jherencia I can confirm your PR fix the problem on iOS when app is in "killed state"
Great to hear, thank you!
why onError callback of onLink method is not called when we do not come by link in iOS?
getInitialLink always returns null in iOS.
Because is not an error.
onError is called when we clicked on a dynamic link and something fails (for example, a network call to Firebase API to resolve the short link)
@jherencia Can I release my App with this PR?
Well, I cannot guarantee anything about this, it's a PR which has to pass a review and a process which can end up in the repo or not.
I wouldn't trust my repo because I can change things in the future without notice.
It's your call to clone it and freeze the version so you can rely on your own repo or wait or whatever you think is the best for your project.
Closing - looks like the problem is now fixed. Please create a new issue if the problem still persists as this one has generated a lot of noise from users posting stack traces without formatting.
Most helpful comment
I'm going to try to check this this week.
EDIT: Finally I will be able to check this next week: September 23-29