• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Auxiliary background executable without dock icon but with some UI
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Auxiliary background executable without dock icon but with some UI


  • Subject: Re: Auxiliary background executable without dock icon but with some UI
  • From: Ken Thomases <email@hidden>
  • Date: Sat, 25 Apr 2009 19:10:06 -0500

On Apr 25, 2009, at 3:52 AM, Oleg Krupnov wrote:

The problem #1 is that although the desired UI window appears, it does
not accept mouse and keyboard input. I guess I haven't properly set up
the run loop, or window server, but I don't know how to do this for
such an auxiliary executable. Any hints would be welcome!

This is typical of a GUI program which isn't bundled into an application bundle.


If you write a Cocoa program in such a way that it doesn't require any resources (e.g. it builds its GUI programatically and doesn't use nibs) and extract the executable from the application bundle and run it, you might expect it to work the same as when it's in the bundle, but it doesn't. You could overcome this using TransformProcessType(), but the better solution is to just make your aux task a bundled LSUIElement application. That is, your main application bundle will contain another application bundle among its contents. That second application bundle will have LSUIElement="1" in its Info.plist.

That said, I'm leery of having a root auxiliary task presenting a GUI. A central principal of security is to minimize the attack surface of privileged tasks. Linking in the GUI frameworks massively increases the attack surface. Can't your third party provide two plugins, one for the aux task and another to present the related GUI in the main task?

Cheers,
Ken

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


References: 
 >Auxiliary background executable without dock icon but with some UI (From: Oleg Krupnov <email@hidden>)

  • Prev by Date: Re: Why is NSString->FSRef so hard?
  • Next by Date: Re: Why is NSString->FSRef so hard?
  • Previous by thread: Re: Auxiliary background executable without dock icon but with some UI
  • Next by thread: How to set tags for ComboBox cell items?
  • Index(es):
    • Date
    • Thread