Search code examples
iphoneobjective-cxcodejailbreak

Can I programmatically lock my iphone screen?


I am working on a jailbroken iphone and I don't care if Apple rejects this app. I am not talking about the simple keypad lock that can be achieved through

GSEventLockDevice();

I am talking about a passcode lock or some way to get the iphone stuck or to disable the home button?

Is it possible programmatically?


Solution

  • It's called kiosk mode or guided mode.

    Here are couple of articles generally describing this subject:

    http://joris.kluivers.nl/blog/2012/03/02/kiosk-mode-for-ios/ http://www.idownloadblog.com/2012/06/26/ios-6-guided-access/

    Here is stackoverflow question with several approaches:

    Lock-down iPhone/iPod/iPad so it can only run one app

    And here is one more approach:

    https://blog.compeople.eu/apps/?p=275