Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent Apple Watch from turning off the screen

I'm writing an extension for the Apple Watch which aim is to guide the user through a set of steps. I don't have the watch to test the extension but I need to be sure that the screen will remain always on until all the steps are completed.

Does anyone can tell me when Apple Watch display is turned off or if there any way to prevent the display from turning off (similar idleTimerDisabled from UIApplication in iOS)?

like image 266
aumanets Avatar asked Apr 07 '15 15:04

aumanets


2 Answers

There is currently no way to programmatically prevent the display from being turned off. Otherwise, we can speculate that as long as the user is interacting with your app, the screen will remain on. Worst case, you'll receive a didDeactivate when the app is suspended and a willActivate when the user wakes it up to continue (assuming the Watch app isn't terminated in between).

like image 159
Mike Swanson Avatar answered Oct 10 '22 23:10

Mike Swanson


As of watchOS 4 you can use this boolean to keep the display on, and this will rotate the UI when the arm is turned.

https://developer.apple.com/documentation/watchkit/wkextension/2868464-isautorotating

like image 43
tennis779 Avatar answered Oct 10 '22 22:10

tennis779