fix(macos): resolve build warnings, memory leaks, and thread safety

- Remove deprecated `cocoa` crate in favor of direct `objc` usage to fix future-incompatibilities warning from `block` dependency.
- Fix irrefutable `if let` pattern warning in macOS `SleepPreventer::Drop`.
- Fix memory leaks by properly releasing `alloc`-ed `NSString` and `NSAppleScript` objects.
- Fix AppKit thread safety by routing dock badge updates to the main thread via `run_on_main_thread`.
This commit is contained in:
NimBold
2026-06-26 21:18:58 +03:30
parent eb7be82e71
commit e1e1061511
3 changed files with 45 additions and 90 deletions
-1
View File
@@ -58,7 +58,6 @@ tauri-plugin-log = "2"
trash = "5"
async-trait = "0.1"
[target.'cfg(target_os = "macos")'.dependencies]
cocoa = "0.25"
objc = "0.2.7"
keyring = { version = "3", features = ["apple-native"] }