Search code examples
objective-cmacosdaemon

Writing daemon in objective c


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?


Solution

  • 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.