Advertisement
Guest User

Try this by iKilledAppl3

a guest
Aug 16th, 2017
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //FrontBoard stuff
  2. //Add this because we need it
  3. //This is the way to reboot, power off, and respring using Apple's FrontBoard classes.
  4. @interface FBSystemService : NSObject
  5. + (id)sharedInstance;
  6. - (void)exitAndRelaunch:(BOOL)relaunch;
  7.  - (void)shutdownAndReboot:(BOOL)arg1;
  8.  -(void)shutdownWithOptions:(unsigned long long)arg1;
  9. @end
  10. //These are example classes
  11. //Not actual methods
  12. %hook classMethod
  13. -(void)powerDown {
  14.     //This is an actual method :P
  15.     //This is to shutdown the device
  16.      [[%c(FBSystemService) sharedInstance] shutdownWithOptions:nil];   
  17.         }];
  18. }
  19.  
  20. -(void)reboot {
  21.     //reboot the device
  22.   [[%c(FBSystemService) sharedInstance] shutdownAndReboot:YES];    
  23. }
  24.  
  25.  
  26. -(void)respring {
  27.         //respring the device
  28.       [[%c(FBSystemService) sharedInstance] exitAndRelaunch:YES];  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement