Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //FrontBoard stuff
- //Add this because we need it
- //This is the way to reboot, power off, and respring using Apple's FrontBoard classes.
- @interface FBSystemService : NSObject
- + (id)sharedInstance;
- - (void)exitAndRelaunch:(BOOL)relaunch;
- - (void)shutdownAndReboot:(BOOL)arg1;
- -(void)shutdownWithOptions:(unsigned long long)arg1;
- @end
- //These are example classes
- //Not actual methods
- %hook classMethod
- -(void)powerDown {
- //This is an actual method :P
- //This is to shutdown the device
- [[%c(FBSystemService) sharedInstance] shutdownWithOptions:nil];
- }];
- }
- -(void)reboot {
- //reboot the device
- [[%c(FBSystemService) sharedInstance] shutdownAndReboot:YES];
- }
- -(void)respring {
- //respring the device
- [[%c(FBSystemService) sharedInstance] exitAndRelaunch:YES];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement