I kinda made a deep link work on macos, even though it never worked with code from docs, and was very tricky to make it work. I am stucked on linux version. Not sure why clear tauri project works fine, but if copied code to migrated from v1 project it just doesnt work.
The main problem is that i register a schema
"plugins": {
"deep-link": {
"desktop": {
"schemes": ["test"]
}
}
},
then checking in a js, await isRegistered('test') which returns true.
lib.rs has all setuped as in docs
tauri::Builder::default()
.plugin(tauri_plugin_single_instance::init(|app, argv, _cwd| {
let _ = app.get_webview_window("main")
.expect("no main window")
.set_focus();
println!("a new app instance was opened with {argv:?} and the deep link event was already triggered");
}))
.plugin(tauri_plugin_deep_link::init())
.plugin(tauri_plugin_global_shortcut::Builder::new().build())
.plugin(tauri_plugin_http::init())
.plugin(tauri_plugin_fs::init())
.plugin(tauri_plugin_os::init())
.plugin(tauri_plugin_dialog::init())
.plugin(tauri_plugin_process::init())
.plugin(tauri_plugin_shell::init())
.setup(|app| {
#[cfg(any(windows, target_os = "linux"))]
{
use tauri_plugin_deep_link::DeepLinkExt;
app.deep_link().register_all()?;
}
Ok(())
})
.plugin(tauri_plugin_websocket::init())
and it just returns error when i am trying to do a xdg-open test://something in terminal gio: test://something: The specified location is not supported all the time.
When i do same code but in clear project it works fine. It is Ubuntu 24.
I even try to build a deb package and install, then it will open an app, but url will have only path to app which was opened, and it never fires onOpenUrl nor other listeners.