On 2011 Jun 09, at 10:43, Jens Alfke wrote: > On Jun 9, 2011, at 4:10 AM, Leonardo wrote: > >> I just hope that the helper can launch the app as totally hidden, while a >> user could still launch the app (on a different moment) as a non-hidden app. >> Can I do that? I mean can the helper set the LaunchServices of the app on >> the fly? > > Nope. LSUIElement is a read-only attribute of the app’s Info.plist file. > You’ll need a separate app bundle with that key in its plist, or a bare > executable, if you need code to run without a UI.
There may be another way. Some users prefer to run one of my apps as an LSUIElement, using only its Status Item (menulet). So I put LSUIElement in its Info.plist. When it launches, it looks for the Boolean "RunInBackground" key in user defaults and, if not found, it immediately invokes TransformProcessType() and the GUI appears. Of course, that "RunInBackground" key had better be absent by default ;) _______________________________________________ Cocoa-dev mailing list ([email protected]) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
