Skip to content
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

Fix for getInitialLink returning null issue when cold-starting iOS app from a push notification [iOS ONLY] #129

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ritaamro
Copy link

@ritaamro ritaamro commented Aug 4, 2021

To give some context:
We have a Flutter app utilizing uni_links for handling custom scheme-based deeplinks into the app, and we're using Braze for CRM. Push notifications worked just fine when the app was in foreground or background. However, only when tapping a PN resulted in cold-starting the app, getInitialLink kept returning null*. After debugging with Xcode, we noticed that getInitialLink got invoked twice, first time both "initialLink" and "latestLink" were pointing to the deeplinked url, but the second time only "latestLink" was. But "initialLink" was the one always passed back to Flutter. We were able to fix the issue with this solution, but there could be better way to keep this double invocation from happening in the first place.

  • When tapping a link received in a message for example, getInitialLink returned the link just right.

@Irfan-KV
Copy link

Irfan-KV commented Oct 6, 2021

@avioli Can you please merge this.

@followthemoney1
Copy link

@avioli can we merge this pull request?

@yusriltakeuchi
Copy link

@ritaamro I don't think the author will merge quickly.
Can I use your repository?

@ritaamro
Copy link
Author

ritaamro commented May 16, 2022 via email

@julianfalcionelli
Copy link

julianfalcionelli commented Dec 5, 2022

I am in the same situation, we are using Braze, and the Deeplinks for Cold-Starting iOS App doesn't work. Tried this and works fine now, why has this is not merged yet... do you think this may be related with just the Braze SDK (maybe they are missing something in their Push Payload?)

@rs-follow
Copy link

@avioli this LGTM and fixes my issue of getInitialUri returning null on cold starts for iOS

@jseminck
Copy link

I switched to https://pub.dev/packages/app_links and everything works as expected. This package is also better maintained than this one.

yuyangpl added a commit to mintinglabs/flutter_uni_links that referenced this pull request Nov 28, 2023
@avioli
Copy link
Owner

avioli commented Apr 23, 2024

Thank you for this contribution, but I don't have any time to maintain this package, so it is now marked as discontinued and app_links recommended replacement.

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

Successfully merging this pull request may close these issues.

10 participants