progrium / darwinkit

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

Binding for `UNUserNotificationCenter` does not exist? #257

Open ukane-philemon opened 2 months ago

ukane-philemon commented 2 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.