macOS local push notification: App Icon not shown in notification

I just tried out local push notifications on macOS for a standalone application for the first time. I emit them like that

juce::PushNotifications::Notification notification;

notification.identifier = "MyID" + juce::String (juce::Random::getSystemRandom().nextInt());
notification.title = "Notification Title";
notification.body = "A body text";
notification.soundToPlay = juce::URL ("default_os_sound");

jassert (notification.isValid());

juce::PushNotifications::getInstance()->sendLocalNotification (notification);

It all works as expected, except for the fact that the icon shown in the notification badge is the default icon that is also shown in the dock if no app icon has been assigned yet. However the app has an icon assigned via the ICON_BIG property in CMake which also appears in the dock.

I tried assigning PushNotifications::Notification::icon which made the specified icon appear on the right of the badge but the generic app icon on the left stayed.

Am I missing something? Note, we haven’t updated to JUCE 8 yet, this is still on JUCE 7

Friendly bump – it just makes the notification appear rather unprofessional as it is right now, so nothing I would want to release, therefore it’s kind of a blocker.

I’ve look through the git changes, besides removing macOS 10.9 compatibility checks from the code there have not been any relevant changes between the JUCE 7 version I’m on and the JUCE 8 master, so at least I’m pretty sure that it’s still an issue with the current JUCE version.

I wonder if that could somehow be caused by the use of a deprecated API for the push notifications? I also tried specifying an explicit small app icon but no changes. Can anyone from the JUCE team at least confirm that it works on their side with a small test app to find out if the problem is on my end or in the JUCE implementation?

If I set ICON_BIG and ICON_SMALL on the PushNotificationsDemo then the icon displays correctly in the notification - but only after restarting the computer. Maybe macOS caches the app icon somewhere on first launch.

Sonoma 14.6.1 Arm

Thank you @reuk for checking this. Indeed the restart also did it on my side. Didn’t think of a caching issue like that. Anyway, glad it works now