llfbandit / app_links

Android App Links, Deep Links, iOs Universal Links and Custom URL schemes handler for Flutter.
https://pub.dev/packages/app_links
Apache License 2.0
176 stars 68 forks source link

getInitialAppLink() not working on first iOS install from App Store #50

Closed evanwherchek closed 2 months ago

evanwherchek commented 1 year ago

Excellent work on this package :)

Describe the bug

My use case is users click on a link with a unique query parameter that will be used during sign up for my app. This operation uses getInitialAppLink(). Everything seems to be working in development when the app is installed on my device. The link can open the app and get the data with no problem so I try to put it on the App Store. Without the app installed, I click on the link, go to the App Store page, download it, and click continue. When I get to the point where getInitialAppLink() should be called, it doesn't get the data. But then when I close the app and open it again with the link, everything seems to work. This issue seems to be related to #14.

Does it related to

[ ] App Links (Android)
[ ] Deep Links (Android)
[X] Universal Links (iOS)
[ ] or Custom URL schemes? (iOS)

Does the example project work?

[ ] Yes
[ ] No
[X] Irrelevant here

Info.plist

<key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLName</key>
            <string>Bundle ID</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>com.bundle.id</string>
            </array>
        </dict>
    </array>
artemsorochan commented 11 months ago

Btw, does it work for you on GooglePlay first install?

vizakenjack commented 11 months ago

I had the same issue, and found that there is a conflict with this package: https://pub.dev/packages/push

If I remove it, getInitialAppLink() works fine

evanwherchek commented 10 months ago

Btw, does it work for you on GooglePlay first install?

Yes. Google Play first install seems to be working.

Atiqrehman3054 commented 10 months ago

hi i ask question app_links works in that condition if i want pass this params {planid="s34rfdgr54, name = "nick"}; through app_links but app not install in mobile when i click on link it will route to playstore then get parameters this type data will manage app_link???

lohitbura07 commented 8 months ago

Same Issue . Any Update on this?

llfbandit commented 7 months ago

This should be somehow available in app_links 3.5.0-beta.1. Please have a look to the README file for custom app delegates. Feedback appreciated!

aggeloskoutanis commented 6 months ago

Doesnt work for me. Even with the app_links 3.5.0-beta.3.

JosiahThobejane commented 4 months ago

I had the same issue, and found that there is a conflict with this package: https://pub.dev/packages/push

If I remove it, getInitialAppLink() works fine

This worked for me. Funny how there were no error/info messages. Thanks for the fix!

jkoenig134 commented 3 months ago

@llfbandit I have the same issue. Packages push and app_links are installed. When starting my app from a custom URL scheme the initial App link is never recognized.

Edit: misread the title. For me this issue doesn't occur on the Universal Links (I don't use them) instead it happens with Custom URL schemes.

llfbandit commented 2 months ago

If there's conflict with other package please refer to custom setup. If the other package always returns true, there's nothing I can do, I already provide workaround but if the other package is called before this one, this is a dead end.

jkoenig134 commented 1 month ago

@llfbandit is this a bug by the other plugin? Should it return false?

llfbandit commented 1 month ago

Through Flutter, each iOS package registers as an application delegate to handle options at start/resume state. From here, we get multiple isolated delegates.

So, to propagate unhandled options (here links) to other packages, all packages must return false but the concerned package.