Created
July 13, 2020 18:16
-
-
Save MTACS/fe73752f174973c5ad71c09fad6e2cc3 to your computer and use it in GitHub Desktop.
"Fix" for HBRespringController respringAndReturnTo: method freezing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "spawn.h" | |
#import "Prefs.h" | |
#import <Cephei/HBRespringController.h> | |
@implementation PrefsController | |
- (void)respring { | |
[HBRespringController respringAndReturnTo:[NSURL URLWithString:@"prefs:root=YourPrefs"]]; | |
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ | |
pid_t pid; | |
const char *args[] = {"killall", "backboardd", NULL}; | |
posix_spawn(&pid, "/usr/bin/killall", NULL, NULL, (char *const *)args, NULL); | |
}); | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment