[launchd-dev] Creating a Launch Agent (per user) on demand when client app is open

Quinn "The Eskimo!" eskimo1 at apple.com
Thu Jan 15 05:09:45 PST 2015


On 15 Jan 2015, at 12:25, Piotr Panasewicz <piotr.panasewicz at mac.com> wrote:

> I would like to create a Launch Agent that would start on demand when my bundle app requires it.

I'm not sure I understand your requirements correctly, but the best way to achieve the goal as summarised by the above sentence is to have the agent listen on an IPC channel and have the app send a message on that channel.  And the IPC channel of choice these days is XPC, via the very nice NSXPCConnection API.

Share and Enjoy
--
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware




More information about the launchd-dev mailing list