Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to unlock iOS screen programmatically?

I'm currently exploring creating a jailbreak tweak. I want to unlock the phone screen. How is this done? What private API can be used to achieve this on iOS 7?

like image 364
radj Avatar asked Feb 11 '14 15:02

radj


1 Answers

If we are talking about jailbreak then you can write a SpringBoard tweak that does this (iOS 7 only)

[[objc_getClass("SBBacklightController") sharedInstance] turnOnScreenFullyWithBacklightSource:0];
[[objc_getClass("SBLockScreenManager") sharedInstance] unlockUIFromSource:0 withOptions:nil];

Without passcode lock the code will turn on the screen and unlock the device. With passcode it will turn on the screen and request passcode.

like image 167
creker Avatar answered Oct 06 '22 01:10

creker