diff --git a/Preferences/Controllers/BatteryBuddyRootListController.h b/Preferences/Controllers/BatteryBuddyRootListController.h index 91d5e21..4135490 100644 --- a/Preferences/Controllers/BatteryBuddyRootListController.h +++ b/Preferences/Controllers/BatteryBuddyRootListController.h @@ -1,8 +1,13 @@ #import #import #import -#import #import "../PreferenceKeys.h" @interface BatteryBuddyRootListController : PSListController @end + +@interface NSTask : NSObject +@property(copy)NSArray* arguments; +@property(copy)NSString* launchPath; +- (void)launch; +@end diff --git a/Preferences/Controllers/BatteryBuddyRootListController.m b/Preferences/Controllers/BatteryBuddyRootListController.m index 1d6ae8e..3d87a0c 100644 --- a/Preferences/Controllers/BatteryBuddyRootListController.m +++ b/Preferences/Controllers/BatteryBuddyRootListController.m @@ -35,9 +35,10 @@ - (void)promptToRespring { } - (void)respring { - pid_t pid; - const char* args[] = {"sbreload", NULL}; - posix_spawn(&pid, "/usr/bin/sbreload", NULL, NULL, (char * const *)args, NULL); + NSTask* task = [[NSTask alloc] init]; + [task setLaunchPath:@"/usr/bin/killall"]; + [task setArguments:[NSArray arrayWithObjects:@"backboardd", nil]]; + [task launch]; } - (void)resetPrompt { diff --git a/control b/control index 0f17088..990cc89 100644 --- a/control +++ b/control @@ -2,7 +2,7 @@ Package: dev.traurige.batterybuddy Name: BatteryBuddy Depends: firmware (>= 13.0), mobilesubstrate, preferenceloader Conflicts: love.litten.batterybuddy -Version: 1.3.1 +Version: 1.3.2 Architecture: iphoneos-arm Description: Battery indicator, but cute Maintainer: Traurige