Best practice for activating a menubar app

Hey Team,

I'm developing an app that normally resides in the menu bar and has no Dock icon (activation policy set to accessory.

When the user clicks the status icon, and selects 'Settings' in the menu, I change the activation policy to regular, show the window, and activate the app.

Since cooperative activation was introduced, the option to ignore all apps when activating was deprecated, so I activate the app without the option.

The result is that in 20% of the times, the window doesn't come to the front, or the app is not activated.

The user obviously wants this behavior, so what is the proper way to achieve it?

Thanks, Ari

Great question, especially since the window orderFront should be directly trackable by AppKit events and actions!

Hi there! Please submit a feedback request with a test app so that we can investigate.

If you could paste the link here once you've done that, that would be great.

I filed something similar in 2023

FB12399363

Best practice for activating a menubar app
 
 
Q