diff --git a/.changes/fix-mac-notification-appid.md b/.changes/fix-mac-notification-appid.md new file mode 100644 index 000000000..fd05f4960 --- /dev/null +++ b/.changes/fix-mac-notification-appid.md @@ -0,0 +1,5 @@ +--- +"tauri": patch +--- + +Set the application bundle identifier for the notifications on macOS. diff --git a/core/tauri/src/api/notification.rs b/core/tauri/src/api/notification.rs index c658f17bb..982283f21 100644 --- a/core/tauri/src/api/notification.rs +++ b/core/tauri/src/api/notification.rs @@ -96,6 +96,14 @@ impl Notification { notification.app_id(&self.identifier); } } + #[cfg(target_os = "macos")] + { + let _ = notify_rust::set_application(if cfg!(feature = "custom-protocol") { + &self.identifier + } else { + "com.apple.Terminal" + }); + } crate::async_runtime::spawn(async move { notification.show().expect("failed to show notification"); diff --git a/examples/api/src-tauri/Cargo.lock b/examples/api/src-tauri/Cargo.lock index c0498ada4..e7d9adc7f 100644 --- a/examples/api/src-tauri/Cargo.lock +++ b/examples/api/src-tauri/Cargo.lock @@ -3171,7 +3171,7 @@ dependencies = [ [[package]] name = "tauri" -version = "1.0.0-rc.5" +version = "1.0.0-rc.6" dependencies = [ "anyhow", "attohttpc", @@ -3289,7 +3289,7 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "0.3.4" +version = "0.3.5" dependencies = [ "gtk", "rand 0.8.5",