OSX Notification Center Icon

Viewed 11320

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 default "your app doesn't have an icon" icon keeps showing up:

Here's what I've done so far

  • I have created an icns file that includes 512, 256, 128, 32 & 16px versions
  • dragged the icon into the "App Icon" section of the target's summary
  • I made to sure to check the box to copy the icon into the project
  • the plist's "Icon file" section references the correct icon name (minus the .icns) part

Any ideas? The icon doesn't show up when I run the app thru Xcode or when I export an archive either.

I also have extracted the Sparrow.icns file from Sparrow.app and tried using that one instead of the one I made. That didn't work either.

9 Answers

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

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.

Related