Advertisement
iOSthemem0d

Untitled

Mar 5th, 2020
931
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #import <UIKit/UIKit.h>
  2. #import <notify.h>
  3. #import <spawn.h>
  4.  
  5.  
  6. %hook SpringBoard
  7. -(id) init {
  8.     int notify_token;  
  9.     notify_register_dispatch("invokeRespring", &notify_token, dispatch_get_main_queue(), ^(int token) {
  10.        
  11.     pid_t pid;
  12.     int status;
  13.     const char* args[] = {"killall", "-9", "backboardd", NULL};
  14.     posix_spawn(&pid, "/usr/bin/killall", NULL, NULL, (char* const*)args, NULL);
  15.     waitpid(pid, &status, WEXITED);
  16.  
  17.     });
  18.     return %orig;
  19. }
  20. %end
  21.  
  22.  
  23. %hook UITabBar
  24.  
  25. -(void)layoutSubviews {
  26.   %orig;
  27.   // Button for respring code here
  28. }
  29.  
  30. %new
  31. -(void)respring{
  32. notify_post("invokeRespring");
  33. }
  34. %end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement