Programmatically lock and unlock iPhone screen

It’s not possible. However, you can “prevent” your phone from locking when your app is running. [UIApplication sharedApplication].idleTimerDisabled = YES should do it.

Leave a Comment