Hide an application's dock icon

Is there an easy way to hide an application's dock icon? For example, I can't hide Iconfactory xScope dock icon. Most similar apps have an option to hide the dock icon, but I can't seem to find one in this app's preferences.


Solution 1:

Try editing the app's plist (inside the .app package i.e xScope.app/Contents/Info.plist)

and add or edit the following entry:

<key>NSUIElement</key>
<string>1</string>

Because this hides the menu bars, it should be possible to create a keyboard shortcut in System Preferences>Keyboard>Keyboard Shortcuts for any functionality that you need the menus for.

Solution 2:

Plist files use a key/value format, declaring the type of the key. The correct code is:

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

Stick these in before the </dict> </plist> lines, and voilà. This works for me on High Sierra.

Some extra help for the less experienced.........

Apple, as usual, makes this sort of control over your own computer difficult when not impossible. Here's what you have to do:

  1. Make sure you are logged in as an Administrator.
  2. In Finder, under Applications, find the relevant app. Right-click > select "Show Package Contents" > select "Contents." You should now see the directory containing your app, which should include a file called info.plist.
  3. Double-click the .plist file. This should open the file in TextEdit.
  4. As soon as you try to do anything to the file, you will get a message saying "You don’t have permission to write to the folder that the file 'Info' is in" and offering to let you edit a duplicate. Click "Duplicate."
  5. Make the edit as above.
  6. Save the (duplicate) file to your desktop. Name it info.plist. (Be careful not to let Finder change the extension to .txt, or add "copy" to the name. If in doubt, uncheck "Hide extension" in the lower left of the Save window.)
  7. Copy this newly-edited file back to the "Contents" folder you found in Step 2.

N.B. I am skipping the ridiculous number of times you will have to enter your password.