7

I have an application that has LSUIElement = 1 in the Info.plist. When I run the application, a dock item and toplevel menu bar is created for it. Why?

EDIT:

I was using a library that was calling TransformProcessType(), clobbering my Info.plist configuration.

Thomas Tempelmann
  • 11,045
  • 8
  • 74
  • 149
anthony
  • 40,424
  • 5
  • 55
  • 128

2 Answers2

12

Go to your Info.plist file, and add a new key-value pair, or type Boolean. Start typing in the key the phrase "Application is agent". It should auto-complete for you. Then check the checkbox.

This is how I create my agent applications, and it works every time!

Dave DeLong
  • 242,470
  • 58
  • 448
  • 498
  • It is a string (not a boolean) according to this Apple page: http://developer.apple.com/library/ios/#documentation/general/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html – knocte Apr 10 '12 at 21:00
4

The 1 must be a string, not a number (according to the documentation of LSUIElement). Something to try anyway.

Gilles 'SO- stop being evil'
  • 104,111
  • 38
  • 209
  • 254
drawnonward
  • 53,459
  • 16
  • 107
  • 112
  • Correct, according to this: http://developer.apple.com/library/ios/#documentation/general/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html – knocte Apr 10 '12 at 21:00