0

I'd like to programmatically lock a device from my app. Is this possible? I haven't been able to find any public APIs to do so. Since this app is more for personal use, I don't mind if I have to use a private API.

I'm hoping to get this working on iOS 10+.

Thanks!

babaloo
  • 435
  • 5
  • 24
  • Possible duplicate of [Programmatically lock and unlock iPhone screen](https://stackoverflow.com/questions/832940/programmatically-lock-and-unlock-iphone-screen) – Alejandro Iván Sep 10 '17 at 02:01
  • That question is quite old and it's answers are no longer relevant. I edited to include a mention of iOS 10+ as a requirement. – babaloo Sep 10 '17 at 02:05
  • I know it's an old question, but last edit for the primary answer was on 2014. Anyway, I doubt anything changed from iOS 7 to iOS 10 on this matter. Apple simply doesn't want any dev to mess with core functionalities like this one. If you find a way to do it, I would really appreciate if you can mention me to know what did you do. – Alejandro Iván Sep 10 '17 at 02:09
  • yep will do! thanks for your help :) – babaloo Sep 10 '17 at 02:11

1 Answers1

0

It used to be possible by some apps that achieved this, like https://github.com/neuroo/LockMeNow, but it was for iOS 6 and below using a private framework called GraphicsServices.framework, so apps using this weren't enabled for App Store submission.

Since iOS 7, you can't do this without a jailbroken device.

Alejandro Iván
  • 3,969
  • 1
  • 21
  • 30