programmatically prevent screen fro sleeping apple tv code example Example: prevent iphone to sleep swift UIApplication.sharedApplication().idleTimerDisabled = true