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 (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to