fix(deep-link): emit new-url event on app load (#1770)

This commit is contained in:
Lucas Fernandes Nogueira
2024-09-12 11:20:16 -03:00
committed by GitHub
parent 2b898f0786
commit 984110a978
5 changed files with 42 additions and 44 deletions
@@ -17,7 +17,7 @@
<key>CFBundleShortVersionString</key>
<string>0.0.0</string>
<key>CFBundleVersion</key>
<string>0.0.0</string>
<string>0.1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
@@ -6,7 +6,6 @@
<array>
<string>applinks:fabianlars.de</string>
<string>applinks:tauri.app</string>
<string>applinks:91f4-177-23-156-161.ngrok-free.app</string>
</array>
</dict>
</plist>
@@ -12,10 +12,17 @@ fn greet(name: &str) -> String {
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.plugin(tauri_plugin_single_instance::init(|_app, argv, _cwd| {
#[allow(unused_mut)]
let mut builder = tauri::Builder::default();
#[cfg(desktop)]
{
builder = builder.plugin(tauri_plugin_single_instance::init(|_app, argv, _cwd| {
println!("single instance triggered: {argv:?}");
}))
}));
}
builder
.plugin(tauri_plugin_deep_link::init())
.plugin(
tauri_plugin_log::Builder::default()