Hello everyone. My past few related questions weren’t answered, but maybe 
someone can shed light on this one.

I am writing a daemon (a system background process that runs always, 
privileged, started by launchd). 
My code is mostly C++ “unix style” but also relies on few private 
Cocoa-Frameworks, and needs access to resources, user-defaults, and other 
CFBundle/NSBundle APIs. I’d better have it a code-bundle.

Now all the semantics of launchd configuration plists are directing to a 
specific binary executable to be launched - not a code bundle (App, or other).

Documentation for launchd is very much on the “unix side” of things, while 
descriptions of “Login Items” and other user agents lie only in the “Cocoa App” 
realm - and I can’t find my way in the middle.

My questions: 

1. Can launchd launch a code bundle? as a daemon?

2. If so - What kind of code bundles are supported? I can’t have an .app bundle 
because I’m really a daemon with no user interaction.

3. If I make a code bundle (Plugin style) and tell launchd the exact path of 
the binary within it - will my binary (started by launchd) still know it is 
“coming from a bundle”, and will it be able to access its bundle, its 
resources, its user-defaults in the bundle’s domain, and its internal 
frameworks?

Any hint will be greatly appreciated. Thanks.


Motti Shneor.



_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to