I am trying to find the device lock state, since UIApplicationState gives an incorrect state when the device is locked, it gives UIApplicationStateActive for a few seconds.
I found one solution using Darwin notifications for the notification "com.apple.springboard.lockcomplete".
Is this the right way to get the lock state? Does Apple allow this?
source
share