Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #import <UIKit/UIKit.h>
- #import <notify.h>
- #import <spawn.h>
- %hook SpringBoard
- -(id) init {
- int notify_token;
- notify_register_dispatch("invokeRespring", ¬ify_token, dispatch_get_main_queue(), ^(int token) {
- pid_t pid;
- int status;
- const char* args[] = {"killall", "-9", "backboardd", NULL};
- posix_spawn(&pid, "/usr/bin/killall", NULL, NULL, (char* const*)args, NULL);
- waitpid(pid, &status, WEXITED);
- });
- return %orig;
- }
- %end
- %hook UITabBar
- -(void)layoutSubviews {
- %orig;
- // Button for respring code here
- }
- %new
- -(void)respring{
- notify_post("invokeRespring");
- }
- %end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement