NSUserNotificationAlertStyle plist key not working

后端 未结 4 2095
-上瘾入骨i
-上瘾入骨i 2021-01-12 03:27

I am working on sample user notification on 10.8 however the key NSUserNotificationAlertStyle when i set it to alerts not working, my application still shows it as banner, t

4条回答
  •  猫巷女王i
    2021-01-12 03:37

    It works, but you must

    1. Code sign your application;
    2. Set alert string value for NSUserNotificationAlertStyle key in your app info.plist file;
    3. Make sure they are not turned off in Notifications tab of System Preferences.

    If you already experiment with notifications it will be better to perform it from scratch. Here how you can remove app from User Notification Center.

提交回复
热议问题