Tag Archives: iOS

SBGetScreenLockStatus (iPhone / iPad / iOS)

I figured out the parameters for the iOS SpringBoard SBGetScreenLockStatus method.  At first I was sure it would only be setting one bool to say if it was locked or not, but actually it turns out that it sets two.  The second just tells you whether or a passcode is enabled.  I’m calling it via the SpringBoardServices so it’s simply…

bool locked;
bool passcode;
void* (*SBGetScreenLockStatus)(mach_port_t* port, bool *lockStatus, bool *passcodeEnabled) = dlsym(sbserv, "SBGetScreenLockStatus");
SBGetScreenLockStatus(sbPort, &locked, &passcode);