avioli / uni_links

Flutter plugin for accepting incoming links.
BSD 2-Clause "Simplified" License
564 stars 316 forks source link

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

Open ritaamro opened 3 years ago

ritaamro commented 3 years ago

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.

Irfan-KV commented 3 years ago

@avioli Can you please merge this.

followthemoney1 commented 2 years ago

@avioli can we merge this pull request?

yusriltakeuchi commented 2 years ago

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

ritaamro commented 2 years ago

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: @.***>

julianfalcionelli commented 1 year ago

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 commented 1 year ago

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

jseminck commented 1 year ago

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

avioli commented 7 months ago

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.