Skip to content

Commit f67ae6b

Browse files
authored
fix(core): set bundle id for notifications on macOS (#3839)
1 parent 9712ed1 commit f67ae6b

3 files changed

Lines changed: 15 additions & 2 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": patch
3+
---
4+
5+
Set the application bundle identifier for the notifications on macOS.

core/tauri/src/api/notification.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,14 @@ impl Notification {
9696
notification.app_id(&self.identifier);
9797
}
9898
}
99+
#[cfg(target_os = "macos")]
100+
{
101+
let _ = notify_rust::set_application(if cfg!(feature = "custom-protocol") {
102+
&self.identifier
103+
} else {
104+
"com.apple.Terminal"
105+
});
106+
}
99107

100108
crate::async_runtime::spawn(async move {
101109
notification.show().expect("failed to show notification");

examples/api/src-tauri/Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)