Search code examples
macoscocoaitunesnsusernotificationnsusernotificationcenter

NSUserNotification customisable app icon?


I just noticed that iTunes' notification icon was replaced by album covers:

iTunes Notification

And it's app icon was a small one near the title, which is a bit different from the ones I knew of:

Normal Notification

Where I can only add images as part of the content, not the app icon.

Is there an undocumented NSUserNotification API that I didn't know?


Solution

  • NVM, I found the answer.

    iTunes use private APIs.

    NSUserNotification *notification = [NSUserNotification new];
    [notification setValue:anImage forKey:@"_identityImage"];