uni_links icon indicating copy to clipboard operation
uni_links copied to clipboard

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

Open ritaamro opened this issue 3 years ago • 8 comments

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.

ritaamro avatar Aug 04 '21 14:08 ritaamro

@avioli Can you please merge this.

Irfan-KV avatar Oct 06 '21 11:10 Irfan-KV

@avioli can we merge this pull request?

followthemoney1 avatar Jan 24 '22 10:01 followthemoney1

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

yusriltakeuchi avatar May 11 '22 07:05 yusriltakeuchi

Of course :))

On Wed, May 11, 2022 at 9:10 AM Yusril Rapsanjani @.***> wrote:

@ritaamro https://github.com/ritaamro I don't think the author will merge quickly. Can I use your repository?

— Reply to this email directly, view it on GitHub https://github.com/avioli/uni_links/pull/129#issuecomment-1123266555, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOGFAFL3MC36QP3H7XP7G3VJNMP5ANCNFSM5BRG2QMQ . You are receiving this because you were mentioned.Message ID: @.***>

ritaamro avatar May 16 '22 00:05 ritaamro

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?)

julianfalcionelli avatar Dec 05 '22 11:12 julianfalcionelli

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

rs-follow avatar Apr 06 '23 19:04 rs-follow

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

jseminck avatar Jul 10 '23 14:07 jseminck

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.

avioli avatar Apr 23 '24 09:04 avioli