Hiding a macOS app from the Dock
There is no way to hide an application from the Dock at run-time, but the application can declare itself to be an agent. macOS doesn't show agents in the Dock or in the Force Quit Applications window. Agents are visible for utilities like Activity Monitor, Unix command-line tools (eg top), as well as macOS API functions.
For example, startlazarus is an agent, launched by the Lazarus IDE when rebuilt.
To declare an application to be an agent, open the application's bundle Info.plist file:
- add a property LSUIElement (or "Application is agent");
- set LSUIElement property's value to True (or check with the checkbox);
- save the Info.plist file.