Search code examples
tvosscreensaver

How do I let tvOS know not to start the screensaver


I have a tvOS application that draws generative art. I'd like to avoid the screensaver kicking in while my app is running. During development, I find that the screensaver starts after the amount of time listed in the system prefs. Is there a way to tell it not to start?


Solution

  • This is managed via the idletimer of your application. Disabeling it will prevent sleepmode on iOS and the coresponding screensaver on tvOS

    https://developer.apple.com/documentation/uikit/uiapplication/1623070-isidletimerdisabled