OSX Notification Center Icon

后端 未结 9 697
渐次进展
渐次进展 2020-12-03 01:42

I\'m using OSX\'s Notification Center APIs for the first time and can\'t seem to figure out how to make my app\'s icon to show up in the Notification badge.

The defa

相关标签:
9条回答
  • 2020-12-03 02:06

    If anyone still having this issue, and none of the methods above worked, here is how I solved it:

    1. open Notifications from the System Preference (easiest is to open Alfred or spotlight and type Notifications)
    2. find your application and remove it (press backspace/delete button)

    NOTE: this may remove all notifications

    0 讨论(0)
  • 2020-12-03 02:07

    I am using Xcode 11.5 and I had the same problem. In my case tough, it was sufficient to clean build output, close and reopen the project. Then do a fresh build and let it run again. The icon was there afterwards.

    Side note: I've placed the app icon for every size in the assets.xcassets file, except 1024 x 1024 pixels. Don't know if this is relevant or not. Hope that helps.

    0 讨论(0)
  • 2020-12-03 02:09

    You can force the Notification Center to refresh all of the icons by deleting the Notification Center database file (~/Library/Application Support/NotificationCenter/SOME_UUID.db) and then killing the Notification Center process (e.g., from Activity Monitor).

    Unfortunately this has the side effect of deleting your notification history, but this wasn't too much of an issue for me.

    0 讨论(0)
提交回复
热议问题