ultisuite-client/mobile/apps/contacts/src-tauri/src/lib.rs
R3D347HR4Y d6d18f911b
Some checks failed
E2E / Playwright e2e (push) Has been cancelled
Lots of stuff and mobile app
2026-06-17 00:13:28 +02:00

29 lines
1.0 KiB
Rust

//! Contacts native shell. Loads the shared static export at `/contacts/`
//! and wires the suite's native capabilities through `ulti-core` + plugins.
use tauri::Emitter;
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.plugin(tauri_plugin_deep_link::init())
.plugin(tauri_plugin_notification::init())
.plugin(tauri_plugin_opener::init())
.plugin(ulti_core::init())
.setup(|app| {
#[cfg(any(target_os = "android", target_os = "ios", desktop))]
{
use tauri_plugin_deep_link::DeepLinkExt;
let handle = app.handle().clone();
app.deep_link().on_open_url(move |event| {
let urls: Vec<String> =
event.urls().iter().map(|u| u.to_string()).collect();
let _ = handle.emit("ulti://deep-link", urls);
});
}
Ok(())
})
.run(tauri::generate_context!())
.expect("error while running Contacts");
}