I am developing an app in Xcode on Mac and would like to know the event which is fired when the mac gets back from sleep. AwakeFromNib doesn\'t seem to work.
Thanks
You can use IORegisterForSystemPower().
Connects the caller to the Root Power Domain IOService for the purpose of receiving sleep & wake notifications for the system. Does not provide system shutdown and restart notifications.
io_connect_t IORegisterForSystemPower (
void *refcon,
IONotificationPortRef *thePortRef,
IOServiceInterestCallback callback,
io_object_t *notifier ) ;
Take a look at Q:How can my application get notified when the computer is going to sleep or waking from sleep? How to I prevent sleep?