diff --git a/src-tauri/src/ios.rs b/src-tauri/src/ios.rs index 131d888dd..4419eb1a6 100644 --- a/src-tauri/src/ios.rs +++ b/src-tauri/src/ios.rs @@ -113,10 +113,7 @@ fn load_system_sound(caf_bytes: &[u8], temp_name: &str) -> Option { } unsafe { let path_str = NSString::from_str(&path.to_string_lossy()); - let url: Option> = msg_send![ - NSURL, fileURLWithPath: &*path_str - ]; - let url = url?; + let url = NSURL::fileURLWithPath(&path_str); let mut sound_id: u32 = 0; let status = AudioServicesCreateSystemSoundID( &*url as *mut _ as *mut objc2::runtime::AnyObject, @@ -138,7 +135,7 @@ pub(crate) fn play_notification_sound(kind: String) -> Result<(), String> { } else { &NOTIFICATION_SOUND }; - let caf = if kind == "invite" { + let caf: &[u8] = if kind == "invite" { include_bytes!("../resources/invite.caf") } else { include_bytes!("../resources/notification.caf") diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 918da42e4..e80dd3f46 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -179,7 +179,10 @@ pub fn show_or_create_main_window(app: &AppHandle) -> taur #[cfg(any(target_os = "windows", target_os = "linux"))] let builder = builder.decorations(!desktop_settings.use_custom_title_bar); + #[cfg(desktop)] let webview_window = builder.build()?; + #[cfg(not(desktop))] + builder.build()?; #[cfg(all(feature = "cef", target_os = "linux"))] setup_cef_resize_workaround(&webview_window)?;