MacOS – How to prevent an application from showing on the Dock

dockmacos

Working with Mac OS X 10.9.5 (Mavericks).

I have an application that is launched with my session and displays its menu from the status bar.

Also, I would like to know if there is a way to prevent this application from also showing on the Dock since I have the possibility to access its menu from the status bar.

If I remove the icon from the Dock, then the application quits.

I've been searching on the web for a solution, I found that modifying the info.plist of the content of the app adding :

<true/>
<key>LSUIElement</key>
<true/>

could solve the issue, but in vain, after that modification, the app keeps "jumping" but doesn't launch. So I recover the code as it was before.

Best Answer

Modifying the Info.plist has made sandboxed applications crash on launch since 10.8.

You can for example run

lsappinfo setinfo -app TextEdit ApplicationType=UIElement

after opening TextEdit to hide TextEdit from the Dock temporarily, but I don't know how to make the change permanent.