Skip to content
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

Use the new Apple Notification Framework #52

Open
vjeantet opened this issue Mar 21, 2023 · 0 comments · May be fixed by #56
Open

Use the new Apple Notification Framework #52

vjeantet opened this issue Mar 21, 2023 · 0 comments · May be fixed by #56
Assignees

Comments

@vjeantet
Copy link
Owner

'NSUserNotification' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API.

And today, some options are no more relevant, like the close button, as it was removed by apple in recent MacOS..

@vjeantet vjeantet self-assigned this Mar 21, 2023
nicholaswmin added a commit to nicholaswmin/alerter that referenced this issue Jan 25, 2025
Fixes vjeantet#52

Replace `NSUserNotification` API with `UserNotifications.frameworks` API.

* Import `UserNotifications/UserNotifications.h` in `alerter/AppDelegate.h` and `alerter/AppDelegate.m`.
* Conform to `UNUserNotificationCenterDelegate` instead of `NSUserNotificationCenterDelegate` in `alerter/AppDelegate.h`.
* Replace `NSUserNotification` with `UNNotificationRequest` for creating notifications in `alerter/AppDelegate.m`.
* Replace `NSUserNotificationCenter` delegate methods with `UNUserNotificationCenter` delegate methods in `alerter/AppDelegate.m`.
* Update methods to use `UNUserNotificationCenter` for managing notifications in `alerter/AppDelegate.m`.
* Remove references to `NSUserNotification` in `alerter/main.m`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant