gotify-desktop icon indicating copy to clipboard operation
gotify-desktop copied to clipboard

fix(build): Fix build on Mac Os

Open zazolabs opened this issue 2 months ago • 1 comments

On MacOs build fails with: Undefined symbols for architecture arm64: "_LSCopyApplicationURLsForBundleIdentifier", referenced from: _setApplication in libmac_notification_sys-a73ca30ec927359c.rlib5 "OBJC_CLASS$_NSImage", referenced from: in libmac_notification_sys-a73ca30ec927359c.rlib5 ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

notify-rust crate uses mac-notification-sys crate but it does require to link against Apple's AppKit framework and CoreServices.

Fix this by creating build.rs that adds the libraries when building on MacOs.

zazolabs avatar Dec 05 '25 22:12 zazolabs

We should not need to do this, the root cause is in the mac-notification-sys crate and has just been fixed upstream: https://github.com/h4llow3En/mac-notification-sys/issues/79

If you run cargo update in the source directory, it should bump the version to 0.6.9, and that should fix it, can you confirm?

desbma avatar Dec 05 '25 22:12 desbma