2

In the Notifications setting pane users can specify if they want an individual app to display notifications as alert, banners, or none. Some of the notifications in my app can work as either, but some are just quick error messages that don't require user interaction so I would like for those to always be banners. I would think that there should be a way to set this programmatically, but I haven't found a way to do it.

Something like notification.type = NSNotificationTypeAlert

Let me know if this can be done. Thanks for the help.

Elbimio
  • 1,041
  • 2
  • 10
  • 25

1 Answers1

1

Not sure if this is what you mean, but you could use the NSUserNotificationAlertStyle key of your application's Info.plist file. Documentation says:

Specifies whether the notification style should be banner, alert, or none. The default value is banner, which is the recommended style. See “NSUserNotificationAlertStyle” for details.

Seb Jachec
  • 3,003
  • 2
  • 30
  • 56
  • This seems to be what I want, but I can't get it to work. Have you ever used it? I found some bug reports that mention that this is not working properly. – Elbimio Dec 07 '13 at 00:05