Is there any way to detect if the iPhone wakes up from sleep while you're app is running? Eg: your app is running, the user locks the screen (or the screen auto locks) and some time later the user unlocks the screen and up pops your app. Is there some way to get an event at that point or detect it somehow?
I've tried searching the Google and this forum, but I can't seem to find anything about it.
See applicationDidBecomeActive:
on UIApplicationDelegate.
Stick these in you AppDelegate.m file:
-(void) applicationWillResignActive:(UIApplication *)application {
NSLog(@"Asleep");
}
-(void) applicationDidBecomeActive:(UIApplication *)application {
NSLog(@"Awake");
}
@Kevin - Nothing wrong with your answer - thanks by the way. Just thought I'd save the next person a Google search.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With