2

When scheduling a NSUserNotification for delivery to NSUserNotificationCenter, is there any way to set the image/logo that shows up alongside the notification on a per-notification basis?

I would like a slightly different logo to show up for different types of notification. Any ideas?

Anoop Vaidya
  • 46,283
  • 15
  • 111
  • 140
Dom Vinyard
  • 2,038
  • 1
  • 23
  • 36

2 Answers2

2

For Mountain Lion it is not there. If you wish you can request it here https://bugreport.apple.com/cgi-bin/WebObjects/RadarWeb.woa/wa/signIn

Anoop Vaidya
  • 46,283
  • 15
  • 111
  • 140
1

You can easily set the Image in OSX mavericks this way.

In the AppDelegate.h file add the line:

@property (copy) NSImage *contentImage NS_AVAILABLE(10_9, NA);

In the AppDelegate.m

notification.contentImage = [NSImage imageNamed:@"test.jpg"];
kyle k
  • 5,134
  • 10
  • 31
  • 45
  • Note that this doesn't change the logo but adds another image. But that's the best public API we have. – nschum Apr 06 '14 at 20:39