plugins-workspace
plugins-workspace copied to clipboard
Does the deep link plugin support custom schemes on mobile?
Reading the official Android deep link documentation, they appear to support custom deep link schemes. The HTTP/HTTPS schemes are actually called web links instead. With non-HTTP/HTTPS deep link schemes no internet connection or verification is needed. Reading the README of the deep link plugin, it seems that at this moment it only supports custom schemes on desktop.
I went to check the code, the android scheme is hardcoded to be http/https:
https://github.com/tauri-apps/plugins-workspace/blob/463f5971eb7b5aa14dd62d7953b51c523447044b/plugins/deep-link/build.rs#L19-L20
Additionally, it's hardcoded that the platform will always verify the host: an intent filter marked with android.intent.category.BROWSABLE will require Android to verify host when the scheme is http/https, and here the intent filter is indeed marked with it.
This isn't very friendly to developers...
I'll see if I can make a PR. I've never written code for a plugin though.
Curious if there has been any progress on this. I'm also interested in arbitrary scheme based deeplinks on android...
@zippy making a deep link plugin for general usage for both Android and iOS is a pretty big project. Therefore, what I did was copying the current deep link plugin into my project and adding only what I needed. Making small modification to the existing plugin turns out to be a pretty feasible way of making this work.
I second this. Currently the deep link plugin only supports app links on Android and universal links on iOS. When the default browser is Chrome on Android and Safari on iOS, these links work fine and will launch the APP from browsers without problem. However, when the default browser is from some phone manufactures default browser on Android or when the default browser is Chrome or Edge on iOS, the deep link will not work, see ref 1 and ref 2. We do need a fallback or an option to setup URI scheme as deeplink just as in the Desktop versions.
Ref 1: https://developer.apple.com/forums/thread/738243 Ref 2: https://stackoverflow.com/questions/66235615/samsung-internet-not-working-with-app-links-are-other-browsers-devices-also-inc