How can I hook Springboard and all apps to listen for a physical button press?

31 Views Asked by At

My problem is that I need to hook Springboard and all Applications to show FLEX when the user presses the volume up and volume down buttons together but the code only needs to hook Springboard when the user is on the home screen or lock screen and apps are only being hooked when the user is in an app. As SB is a superclass of UIApplication and they both have the common method of - (BOOL)_handlePhysicalButtonEvent:(UIPressesEvent *)event { I tried hooking UIApplication but that didn't work on Springboard or Apps, I'm guessing it's because Apps aren't given that privilege. Tweak.x: https://hastebin.com/share/acojorotir.objectivec

0

There are 0 best solutions below