-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
Notification example doesn’t work. #251
Comments
NSUserNotification is an old depreciated api. (see: https://developer.apple.com/documentation/foundation/nsusernotification?language=objc) The newer API has a more complicated handshake, you need to request permissions to present the notification, then you can start sending messages to the Notification center. What is happening with the code in the example is it causing a prompt to ask permission and if you don't click on that first notification and grant permission it doesn't present ANY further notifications. To get the example to run on your machine, change the "bundle identifier" in line 18. "com.example.fake2" with a different identifier and you will trigger the notification permission prompt. |
The notification example (code pasted below for convenience) doesn’t produce any notification under OSX 14.
OS details (
uname -a
):Darwin MyMac 23.3.0 Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:44 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6000 arm6
Code:
The text was updated successfully, but these errors were encountered: