macOS 27 - my faceless bg-only app now appears in the Dock - how to get rid of that?

My macOS app Find Any File contains another app inside its Resources folder. It's a background-only app that checks if the user presses a hotkey, in which case it launches my app.

Since macOS 27, when the hotkey app is running, it appears in the Dock with a "Running in Background" subtitle.

That's totally not wanted. How do I make it not appear in the Dock? I've got both "LSBackgroundOnly" and "LSUIElement" set to true in the Info.plist, to no avail.

Answered by Thomas Tempelmann in 905989022

It's a plain bg-only app that I use it as a Login Item, i.e. I use the old APIs to add it to the Login Items. Worked well since 2011 :)

Changing the NSApplication activationPolicy had no effect, BTW. Anything launched thru LaunchServices, no matter its policy, appears to be appearing in the Dock now, even if it's a Login Item. Apple didn't appear to make an effort to filter out such apps from the new "let's warn the user about these bg apps" mode. I found a few complains on reddit where people had several of these unwanted Dock icons (while still wanting the bg app to keep working).

BTW - what would be the correct place for a Login Item app? The LaunchItems surely isn't it, because that has unwanted side effects if it's not a SMAppService. MacOS folder?

I've now asked Claudia and she updated my code to use the SMAppServices API in macOS 13 and later, while keeping the old method pre-13. Works! Just released a new beta that should do it: https://findanyfile.app/beta.html

My macOS app Find Any File contains another app inside its Resources folder.

Executables shouldn't go in the Resources folder.

What kind of artifact is this? Is it a launch agent? A login item? Are you changing the NSApplication activationPolicy?

It's a plain bg-only app that I use it as a Login Item, i.e. I use the old APIs to add it to the Login Items. Worked well since 2011 :)

Changing the NSApplication activationPolicy had no effect, BTW. Anything launched thru LaunchServices, no matter its policy, appears to be appearing in the Dock now, even if it's a Login Item. Apple didn't appear to make an effort to filter out such apps from the new "let's warn the user about these bg apps" mode. I found a few complains on reddit where people had several of these unwanted Dock icons (while still wanting the bg app to keep working).

BTW - what would be the correct place for a Login Item app? The LaunchItems surely isn't it, because that has unwanted side effects if it's not a SMAppService. MacOS folder?

I've now asked Claudia and she updated my code to use the SMAppServices API in macOS 13 and later, while keeping the old method pre-13. Works! Just released a new beta that should do it: https://findanyfile.app/beta.html

what would be the correct place for a Login Item app?

Contents/Library/LoginItems/

Here is some documentation, and some older docs.

The LaunchItems surely isn't it

I'm not aware of that folder.

Another option would be to convert this to a Launch Agent. Launch Agents can be kept alive if they crash, or run on a schedule. And they have a few other neat tricks like XPC. It can be a bit tricky to setup.

macOS 27 - my faceless bg-only app now appears in the Dock - how to get rid of that?
 
 
Q