progrium / darwinkit

Native Mac APIs for Go. Previously known as MacDriver
MIT License
5.04k stars 160 forks source link

Binding for `UNUserNotificationCenter` does not exist? #257

Open ukane-philemon opened 6 months ago

ukane-philemon commented 6 months ago

objc.GetClass("UNUserNotificationCenter") returns {<nil>}.

I've been trying to implement the new notification framework (https://developer.apple.com/documentation/usernotifications/asking-permission-to-use-notifications?language=objc) but can't get a hold of the UNUserNotificationCenter object.

Do I need to register it first? Or I'd have to create it with Objc?

Thanks.

Edit: NSUserNotificationCenter works but is deprecated (https://developer.apple.com/documentation/foundation/nsusernotificationcenter?language=objc)

I'm running Ventura 13.6.6.