background apps

Ever since macOS 27 “Golden Gate” was released, I’ve been getting an increasing number of reports of some of my apps quitting in the background, randomly, without any user interaction. Naturally, my first thought was that those were crashes, yet there was no indication of that: no crash report coming up, no crash logs written to ~/Library/Logs/DiagnosticReports/.
It’s been a head-scratcher. Until today.

Thanks to Scott M. who wrote in, I now know what (at least most) of these unwanted quits are caused by: updates through the Mac App Store.

Previously, when an app was updated through the Mac App Store, the appstoreagentd daemon would quit the app, update it, and then relaunch it.

But guess what? That’s not good anymore. Way too simple and straightforward. It needs to be over-engineered.
So now, before the app is quit, appstoreagentd notes if the app is visible (meaning any visible windows, I assume), then quits the app, updates it, and if the app was not visible in appstoreagentd’s eyes, it will not relaunch the app, and instead obscurely post this message:

Skipping relaunch — app was not visible before termination

Yay. Fun. All developers of background tools that have no visible UI a lot of the time rejoice in this glorious change.

In my case, I use the Info.plist key LSUIElement with a value of true so there’s no icon in the Dock, or app switcher.
However, I do display an NSStatusItem, and even with that visible in the user’s menu bar, it does not make the app “visible” in appstoreagentd’s view.

And what’s the point of this? Saving a bit of energy? I’m sure downloading and installing the update takes way more energy than launching the app afterwards…
The only thing it really accomplishes is frustrating users and developers. Now, if that was the intention: Kudos. Well done.

I’m unaware of any workarounds or fixes, though. Best case scenario would be Apple reverses this and just quits an app if it’s running, updates it, and if it was running, relaunches it. Done.
Bug Report: FB25790005

Update: Apparently I’m not alone in this.


Read more