I'm trying to make an app that simulates the Lock Button press. There are 2 methods that can be called by UIApplication, namely lockButtonDown and lockButtonUp.
This is the code sequence:
UIApplication* ThisApp = [UIApplication sharedApplication];
[ThisApp lockButtonDown: nil];
[ThisApp lockButtonUp: nil];
I confirmed that it works, if I compile it as an .dylib extension to SBSettings. But if I try to make a standalone SpringBoard application, and call these methods when pressed on a button, nothing happens.
Anybody any clues as to why that happens?