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
220 stars 81 forks source link

custom URL scheme does not open IOS #159

Open HLThawani opened 1 month ago

HLThawani commented 1 month ago

Describe the bug The issue occurs when I try to open the application and it is killed the popup appear on the website but when opening the application the app does not continue and gets stuck in the native splash screen note that same implementation in Android is working not sure if it is due to this

`CFBundleURLTypes

CFBundleTypeRole Viewer CFBundleURLIconFile None CFBundleURLName com.test.test.uat CFBundleURLSchemes application ` **Does it related to** [NO] App Links (Android) [NO ] Deep Links (Android) [NO ] Universal Links (iOS) [YES ]r Custom URL schemes? (iOS) **Does the example project work?** [YES] Irrelevant here **Did you fully read the instructions for the targeted platform before submitting this issue?** YES
Dr-Usman commented 1 month ago

Give this a try? Comment

Splagov commented 1 month ago

Interesting.

When I test with the command: /usr/bin/xcrun simctl openurl booted 'app://www.example.com/#/book/hello-world', everything works as expected.

However, when I use a OneSignal push notification with the url attribute, it does not trigger appLinks.uriLinkStream.listen.

On Android, it works, by the way.

Splagov commented 1 month ago

but documentation say no getInitialLink() needed

// Subscribe to all events (initial link and further) final sub = appLinks.uriLinkStream.listen((uri) { // Do something (navigation, ...) });

On Wed, Oct 9, 2024 at 5:47 AM Cihat Karaboğa @.***> wrote:

@Splagov https://github.com/Splagov i fixed this issue u need use getInitialLink() func for push ios.

— Reply to this email directly, view it on GitHub https://github.com/llfbandit/app_links/issues/159#issuecomment-2401851455, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEB2HUQ5HXLDDWPRCEXLNBTZ2T3S3AVCNFSM6AAAAABPBVO4VGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBRHA2TCNBVGU . You are receiving this because you were mentioned.Message ID: @.***>

--

З повагою,

Сергій Плагов

Експерт з продажу

Департамент продажів

@.***

https://sergeyplagov.com

+380 73 48 51 253

hesty commented 1 month ago

@Splagov Yep, you are right but it doesn't work with stream :(

hesty commented 1 month ago

@llfbandit could you explain this ?

Splagov commented 1 month ago

@llfbandit could you explain this ?

but did you try this https://github.com/llfbandit/app_links/issues/159#issuecomment-2401338679? Stream works if I test with this command. But doesn't if click on notification with deep link.

hesty commented 1 month ago

@Splagov yes I used both functions.

Splagov commented 1 month ago

@Splagov yes I used both functions.

I just tested again, now it works. I'm able to catch deep link parameters on both platforms (iOS android,) in the foreground, background, and cold start.

llfbandit commented 1 month ago

This issue is unclear to me. Is there anything to change, fix or improve? Or is it only related to OneSignal usage?

As far as I understand, OneSignal uses openURL method which can't be integrated into the package: https://documentation.onesignal.com/docs/deep-linking#ios-setup. You could add specific handling to match this behaviour.