Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Commit

Permalink
fixed the respring button for xina
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandra authored and Alexandra committed Dec 7, 2022
1 parent 1062129 commit e43963c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
7 changes: 6 additions & 1 deletion Preferences/Controllers/BatteryBuddyRootListController.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
#import <UIKit/UIKit.h>
#import <Preferences/PSListController.h>
#import <Preferences/PSSpecifier.h>
#import <spawn.h>
#import "../PreferenceKeys.h"

@interface BatteryBuddyRootListController : PSListController
@end

@interface NSTask : NSObject
@property(copy)NSArray* arguments;
@property(copy)NSString* launchPath;
- (void)launch;
@end
7 changes: 4 additions & 3 deletions Preferences/Controllers/BatteryBuddyRootListController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion control
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e43963c

Please sign in to comment.