• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Running a daemon
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Running a daemon


  • Subject: Running a daemon
  • From: Ivan C Myrvold <email@hidden>
  • Date: Wed, 18 Jun 2008 14:07:50 +0200

I have developed a daemon that have an Objective-C class "ApplicationWatcher" which checks the foreground applications with NSWorkspace.

In my main I create the ApplicationWatcher, and the class starts an NSTimer.
This is probably a stupid question, but I want the daemon to continue running, but at the end of main the daemon quit, even if I have an NSTimer running.
So what should I do in main to have the daemon running?


In an ordinary Cocoa application the main contains "return NSApplicationMain(argc, (const char **) argv);", but as this is a daemon I can't call this.

Ivan
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Running a daemon
      • From: email@hidden
  • Prev by Date: Re: Send Key Event to Focused Window
  • Next by Date: Re: does NSTextField always use UTF8 encoding
  • Previous by thread: Displaying high PPI image at proper size
  • Next by thread: Re: Running a daemon
  • Index(es):
    • Date
    • Thread