You might want to create an application that doesn’t appear in the dock or in the selector (Cmd-Tab), may it be because it’s a background application or a kind of widget you only want to show through a window for instance.
This is pretty simple: the only step is to add this key in the Info.plist file in your Cocoa Xcode project :
<key>LSUIElement</key> <string>1</string>
An UIELement is an application that is background only but still has a UI (eg a floating utility window).
In the case of a ‘real’ background application, you might want to add this bit instead :
<key>LSBackgroundOnly</key> <string>1</string>
As a matter of fact, the value set for LSBackgroundOnly overrides the value set for LSUIElement, thus setting both to 1 has the same effect than setting LSBackgroundOnly to 1…
Result : when running your application, no dock icon will show up. You won’t get a menu bar either (but you will get a window if you didn’t touch the nib file).
Many thanx for this trick.