0

Is there a way to disable the auto screen lock from an iOS8 custom keyboard?

[UIApplication sharedApplication].idleTimerDisabled = YES;

is not supported in App Extensions.

flopr
  • 450
  • 4
  • 23
  • Video playing app does it. But what is the Use Case for a keyboard to disable the idle lock? – Black Frog Oct 18 '14 at 00:45
  • I'm developing a hardware device connected to iPhone custom keyboard. Text input is coming from the device so the user does not interact with the touch screen causing it to auto lock and close the network socket. :( – flopr Oct 19 '14 at 11:02
  • I don't believe that is a valid reason to leave the screen unlocked. If the hardware device is connected and the users runs to the bathroom, they would except the device to auto-lock if they have it enable. And just because the screen auto-lock, the that is in the foreground is still there. Therefore the socket should be open. If not, your custom keyboard should just re-open the socket. That is part of iOS device, connection may not re reliable. – Black Frog Oct 19 '14 at 11:58
  • I understand this but at the same time user has to regularly touch the screen to stop it from sleeping while using the device to type which is kinda annoying. But it seems like there is no way around this. Thanks for the response though. :) – flopr Oct 20 '14 at 11:12

0 Answers0