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

What is the difference with version 4.0.1 and 5.0.0? #119

Closed leejh10003 closed 2 months ago

leejh10003 commented 2 months ago

Describe the bug

A clear and concise description of what the bug is.

Does it related to

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

Does the example project work?

[ ] Yes
[ ] No
[ ☑️] Irrelevant here

Did you fully read the instructions for the targeted platform before submitting this issue?

Uploaded your files to webserver, HTTPS, direct connection, scheme pattern setup, ...

[ ] Yes
[ ] No
[ ☑️] Irrelevant here

Hi. Thank you for maintaining the wonderful package 🤗

But there is an issue with this package. I'm using kakao_flutter_sdk to authorize users with OAuth. This package sends users to their KakaoTalk app(South Korea's messenger service like WhatsApp) with their URL scheme and back users with my app's Universal Link scheme registered on their server. Till version 4.0.1, there was no issue(the link worked both for Kakao's package and app_links). But with the version starting 5.0.0, app_links resolves Universal Link only for itself. What is the difference in the iOS side code of this package between the two versions?

llfbandit commented 2 months ago

There's a changelog for that 😄 https://pub.dev/packages/app_links/changelog In your case, you'll need to handle it with a bit of native code as stated in the documentation to return true or false. This allows to handle with precision what to dispatch to flutter app and/or propagate to other packages. Otherwise, there's no change between the two versions.

leejh10003 commented 2 months ago

I read it today and understood what happened. But I have a proposal. Wouldn't it be better if app_links ignore some URL schemes based on Info.plist(or some other plist)'s value which has an array of dictionaries which has 'URL', and 'scheme' to be ignored?

And thank you for your quick response 😍

llfbandit commented 2 months ago

Unfortunately this is not possible because the package only catches what the system sends to the app (in compliance with the setup made). This is why this kind of workaround is available. You can do it the way you want.