//! UltiMail native shell. Loads the shared static export at `/mail` and wires //! the suite's native capabilities through `ulti-core` + Tauri 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| { // Forward inbound deep links (custom scheme + universal/app links) // to the frontend router via the `ulti://deep-link` window event. #[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 = 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 UltiMail"); }