iPad App - stop iPad sleeping while playing

Answered

Comments

2 comments

  • Official comment
    Tony W.
    Product Support Manager

    Thanks for the feedback Chris. Unfortunately, this is not a function of Apps but of the OS of your phone or tablet. Apple outright prevents this functionality in their Apps. You will have to change your screensaver options in the Settings menu of your device. 

  • Chris Tobias

    Thanks, Tony. I guess I will try turning off Auto-lock in the iOS settings then.
    Although, I do have a few other apps that manage this on the iPad.
    It seems there is an approach that can be used, but it may have other implications.

    You can stop the iOS screen sleeping by using the isIdleTimerDisabled property of your application. When set to true, this means the screen will never dim or go to sleep while your app is running, so be careful – you don't want to waste your user's battery life!

    Here's an example:

    UIApplication.shared.isIdleTimerDisabled = true
    0

Please sign in to leave a comment.