-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mac notifications do not work #132
Comments
This seems to be an issue with mac-notification-sys, as I don't get a notification even when using that crate directly. I've posted an issue there: h4llow3En/mac-notification-sys#33 (comment) |
I know this issue is a bit old, but I investigated this last night and the problem is at least partially caused by where the binary is run from. The daemon that handles notifications in macOS is called I develop in a subfolder of my documents which is a protected directory. Fetching the entitlements of <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.coreduetd.allow</key>
<true />
<key>com.apple.coreduetd.context</key>
<true />
<key>com.apple.private.push-to-wake</key>
<true />
<key>com.apple.private.dark-wake-push</key>
<true />
<key>com.apple.duet.activityscheduler.allow</key>
<true />
<key>com.apple.private.aps-connection-initiate</key>
<true />
<key>com.apple.private.security.storage.Safari</key>
<true />
<key>com.apple.private.security.storage.HomeKit</key>
<true />
<key>com.apple.private.notificationcenter.server</key>
<true />
<key>com.apple.das.private.application.masquerade</key>
<true />
<key>com.apple.private.donotdisturb.state.updates.client-identifiers</key>
<string>com.apple.private.nc.usernoted</string>
<key>com.apple.private.donotdisturb.settings.modify.client-identifiers</key>
<string>com.apple.private.ncprefs.dnd</string>
</dict>
</plist> None of which grant it permission to access my documents. So I tried running my binary from Hope this helps people in the future. |
Once the binary is placed in the |
What're the list of valid paths on macos then? This lib seems kind of useless if mac isn't easily supported. |
I can't reproduce the issue on an M2 mac. Using version |
@mitjans that's why the issue is open for so long, it's a bit of a heisenbug. |
I can also confirm I had this issue. Doing cargo install then running it works however. |
I tried running the example at https://github.com/hoodie/notify-rust/blob/main/examples/mac.rs.
However I get no notification, the program just runs and closes. The notification center doesn't have anything either.
I am running on a M1 Macbook Pro (14-inch, 2021) on MacOS Monterey.
Compiling with Rust 1.58.0 stable-aarch64-apple-darwin. stable-x86_64-apple-darwin produces the same results.
The text was updated successfully, but these errors were encountered: