macOS User Notifications

I am in the process of updating some deprecated code (Obj-C) in an application that was using the NSUserNotification classes to use the newer UserNotifications and UNUserNotificationCenter. I added code to prompt the user with the requestAuthorizationWithOptions function.

This function always returns a value of granted=false and the error is "Notifications are not allowed for this application". When I look at the system preferences, my Application is in the list, however, the Allow Notifications switch is disabled.

I did create a new project in Swift, and was able to get this working as expected.

Am I missing something in my original application that would cause the notifications not to work, and cause the requestAuthorizationWithOptions function to return the error?

Thanks, Don

macOS User Notifications
 
 
Q