Is there a way to check if the phone is locked? Or do I receive a notification of the phone is going to be locked?
My app runs in the background, continues to play audio, so applicationWillResignActive: isn't really what I am looking for.
Checkout UIApplicationProtectedDataWillBecomeUnavailable. This appears to be called when the device is locked. iOS4 + only.
UIApplicationProtectedDataWillBecomeUnavailable
http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/AdvancedAppTricks/AdvancedAppTricks.html
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