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
If anyone still having this issue, and none of the methods above worked, here is how I solved it:
Notifications
from the System Preference
(easiest is to open Alfred
or spotlight
and type Notifications
)backspace
/delete
button)NOTE: this may remove all notifications
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.
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.