• 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
Machine sleep & wake notifications in a daemon
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Machine sleep & wake notifications in a daemon


  • Subject: Machine sleep & wake notifications in a daemon
  • From: Andrew Keller <email@hidden>
  • Date: Thu, 08 Jan 2015 17:03:56 -0500

Good day,

I would like to receive machine sleep and wake notifications in my daemon.  In my Cocoa GUI application, I was able to easily follow the sample code under Listing 1 on the page <https://developer.apple.com/library/mac/qa/qa1340/_index.html>, but when I tried the same approach in my daemon, I received no errors or warnings from Xcode or in the system console, and yet the handlers also did not fire.  After poking around for a while, I have a hunch that it may have something to do with the main event queue not being the same (or existing at all?) in a non-Cocoa GUI application.

Is it possible to have a Cocoa-style event queue in a daemon, or is there another way to receive machine sleep and wake notifications from the OS in a daemon?

Thanks,
- Andrew Keller
_______________________________________________

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: Machine sleep & wake notifications in a daemon
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: Blurry is the New Sharp
  • Next by Date: Re: Blurry is the New Sharp
  • Previous by thread: Re: Am I Reinventing the Wheel? (Part II)
  • Next by thread: Re: Machine sleep & wake notifications in a daemon
  • Index(es):
    • Date
    • Thread