register_uri_scheme_protocol
behaves differently on different platforms! How to get a real custom uri scheme on Windows?
#10868
Replies: 2 comments 4 replies
-
I just saw that the deep link plugin now supports all platforms. |
Beta Was this translation helpful? Give feedback.
-
Not with built-in Tauri settings, see tauri-apps/wry#1129 but you could use https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2customschemeregistration?view=webview2-dotnet-1.0.2106-prerelease via https://docs.rs/tauri/latest/tauri/window/struct.Window.html#method.with_webview (not sure about that, it probably has to be done before the webview is fully created) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I wrote a file server with
.register_uri_scheme_protocol
on mac to serve extensions (static websites) and load with iframe.For example,
ext://ext-a/
ext://ext-a/about.html
I could parse the "domain" and load from different folders without worrying about setting baseUrl.
The domain section tells me
ext-a
is the folder to load from.It worked perfectly, but when I move to windows,
ext://
is not recognized.convertFileSrc("", "ext")
returnshttp://ext.localhost/
.On windows I can't have a domain. Thus the url becomes
http://ext.localhost/ext-a/about.html
.With this, baseUrl have to be configured for frontend project and could result in lots of trouble.
Is it possible to have a real custom uri scheme on Windows?
Beta Was this translation helpful? Give feedback.
All reactions