Prevent Screensaver from Playing in App

Anyone know how to prevent the screen savers from playing while your tvOS app is running?


Thanks

Felix

Accepted Reply

Based on my very brief test, it appears that UIApplication's "idleTimerDisabled = true" will do that. I tried this in AppDelegate, and the screen saver has yet to fire, although it's now several multiples over the timeout setting:


func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {

application.idleTimerDisabled = true

return true

}

Replies

Based on my very brief test, it appears that UIApplication's "idleTimerDisabled = true" will do that. I tried this in AppDelegate, and the screen saver has yet to fire, although it's now several multiples over the timeout setting:


func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {

application.idleTimerDisabled = true

return true

}

Thank you