Skip to content

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

Open
ritaamro wants to merge 3 commits into
avioli:masterfrom
ritaamro:master
Open

Fix for getInitialLink returning null issue when cold-starting iOS app from a push notification [iOS ONLY]#129
ritaamro wants to merge 3 commits into
avioli:masterfrom
ritaamro:master

Conversation

@ritaamro

@ritaamro ritaamro commented Aug 4, 2021

Copy link
Copy Markdown

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

Irfan-KV commented Oct 6, 2021

Copy link
Copy Markdown

@avioli Can you please merge this.

@followthemoney1

Copy link
Copy Markdown

@avioli can we merge this pull request?

@yusriltakeuchi

Copy link
Copy Markdown

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

@ritaamro

ritaamro commented May 16, 2022 via email

Copy link
Copy Markdown
Author

@julianfalcionelli

julianfalcionelli commented Dec 5, 2022

Copy link
Copy Markdown

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
Copy Markdown

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

@jseminck

Copy link
Copy Markdown

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

avioli commented Apr 23, 2024

Copy link
Copy Markdown
Owner

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