On May 30, 2009, at 11:18 PM, Ammar Ibrahim wrote:
On Sun, May 31, 2009 at 6:16 AM, Chris Hanson <c...@me.com> wrote:

The best way to ensure your daemon or agent is always running is to have it
run via launchd.

Start by reading the launchd man page and the "Daemons and Agents" tech note; these will give you an overview of how Mac OS X used launchd to manage
these types of on-demand and always-on services.

But my app is a "normal" Cocoa App, it's not a daemon or an agent.

It's still essentially an agent, just one that runs in the foreground, not the background.

You can use launchd to keep your app alive. That way you, don't have to worry about adding code to your application to do it, you just have to ensure the launchd property list is in the right place.

That will also make development of your application easier, because your application can run normally; you won't have to put a bunch of extra code into it to disable its keep-alive behavior during development.

  -- Chris

_______________________________________________

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