Reputation: 29
I was wondering if there was a way to programmatically put an iDevice to sleep, for my jailbreak tweak. I would also like to test if iphone is on too. Is there any way (public or private API) that could do this? Even simulating the press would be cool. I know activator cydia tweak can do this, just wondering how.
Upvotes: 0
Views: 549
Reputation: 9570
All methods from private SpringBoardServices.framework
:
void* SBSSpringBoardServerPort();
void SBLockDevice(void*);
To lock device use this:
SBLockDevice(SBSSpringBoardServerPort());
Upvotes: 1