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
2009-12-03 14:27:30
Is it possible to run os x application written in objective c to run as deamon using launchd?
Nirvana
2009-12-03 14:34:21
Why not follow the link I've provided to the documentation, and find out there?
Jonathan Feinberg
2009-12-03 14:36:19
so there is no class in cocoa framework which makes os x app run as a service just like in windows world?
Nirvana
2009-12-03 14:46:17
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
2009-12-03 14:59:57
Nirvana, *read the docs*. See the section "Required Behaviors".
Jonathan Feinberg
2009-12-03 15:18:17
Nirvana, please remove the duplicate questions here: stackoverflow.com/questions/1841393/writing-daemon-in-objective-c
Felixyz
2009-12-07 01:51:06