tags:

views:

213

answers:

1

I need to write a daemon, much like windows service on os x using objective c. Can anyone point to some sample? or guide me about how to do this?

+1  A: 

It's best to write your program in a way that lets it be run in the foreground, and then use external tools and techniques (such as OS X's launchd) to run them detached. This makes your program easier to test and integrate.

Jonathan Feinberg
Is it possible to run os x application written in objective c to run as deamon using launchd?
Nirvana
Why not follow the link I've provided to the documentation, and find out there?
Jonathan Feinberg
so there is no class in cocoa framework which makes os x app run as a service just like in windows world?
Nirvana
by the way jonathan, thanks for helping out. I need to write my own sever kind of app which always runs in the background.
Nirvana
Nirvana, *read the docs*. See the section "Required Behaviors".
Jonathan Feinberg
Nirvana, please remove the duplicate questions here: stackoverflow.com/questions/1841393/writing-daemon-in-objective-c
Felixyz