Lately Niqui has been having some issues with her iPhone 5's lock button. It works now and then, but you have to press it 6-7 times before it actually locks the screen which is quite annoying.
You can set phone to Auto-Lock after a minute but sometimes you want to lock the screen at a particular point in time.
LockMe is a tiny app that simply locks the screen and quits. It uses an undocumented function called GSEventLockDevice
which does just that. Its part of the private GraphicsServices
framework so the app can't be submitted to the App Store, but it does the job until she can get her phone fixed.
There's a few ways to use private frameworks but I found the simplest route was to load it dynamically at runtime. The meat of the app is just ten lines of code.
That's pretty cool if you ask me.
So if you or someone you know has the same issue, grab the app from our GitHub repository, build it for them and be a hero :)