OSX Notification Center Icon

瘦欲@ 提交于 2019-11-27 13:34:03

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.

I was able to fix this issue by incrementing the Build number in the General section for the build Target.

There's actually an ongoing debate on Apple's developer forums (link, link for people with access) about this. As far as I know, there's currently no real solution, but you can try the following:

  • Change your app's bundle ID and try it again. If you change it, clean your app, and change back, some people have reported success with seeing their icon show up.
  • Log in as another user. The caching Notification Center uses may be per-user, so you might be able to get the properly-iconned notifications as a different person.

The folder location has been moved for OSX 10.10+.

Following command takes to you to its new location:

$ cd `getconf DARWIN_USER_DIR`/com.apple.notificationcenter/db                

and then

$ open . 

Easiest way that I managed to get the icon to show up is change the Bundle Identifier in your project. This works on OSX 10.10.5 and XCode 7.2

(Once notification center picks up the change, you can change it back to your original bundle identifier if you already have a provisioning profile associated with it)

I have solved the issue by archiving my app and adding a copy to my applications folder. When the app is in Application folder, the icon is always visible even you run the app from XCode...

I tried all of the above suggestions but the only thing that worked for me on 10.14 was to delete DerivedData:

rm -rf ~/Library/Developer/Xcode/DerivedData

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!