Make Mac Dock icon bounce

Hi, is there any way to do this from JUCE so that an app running in the background can notify the user that something needs to be addresses?

Thx

Does this help?
https://developer.apple.com/documentation/appkit/nsapplication/1428358-requestuserattention

1 Like

This isn’t supported directly. A more modern alternative would be to use the PushNotification support to tell the user a bit about the event.

1 Like

thx - intersting about the push notifications but if that just puts a banner up in the corner of the screen I find that quite easy ignore for something urgent that requires attention.

thx, yes - saw this, just wondered if it was supported natively. thx

Code if anyone else is interested:

#import <AppKit/AppKit.h>

void bounce_dock_icon( void ) {
   NSApplication *app = [NSApplication sharedApplication];
   [app requestUserAttention:NSCriticalRequest];
}
2 Likes