Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a6d04cc
commit a0b0b88
Showing
5 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
include $(THEOS)/makefiles/common.mk | ||
export ARCHS = arm64 | ||
TWEAK_NAME = RealCC | ||
RealCC_FILES = Tweak.xm | ||
RealCC_FRAMEWORKS = UIKit | ||
include $(THEOS_MAKE_PATH)/tweak.mk | ||
|
||
after-install:: | ||
install.exec "killall -9 SpringBoard" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ Filter = { Bundles = ( "com.apple.springboard" ); }; } |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
@interface CCUILabeledRoundButton | ||
@property (nonatomic, copy, readwrite) NSString *title; | ||
@end | ||
|
||
@interface SBWiFiManager | ||
-(id)sharedInstance; | ||
-(void)setWiFiEnabled:(BOOL)enabled; | ||
-(bool)wiFiEnabled; | ||
@end | ||
|
||
@interface BluetoothManager | ||
-(id)sharedInstance; | ||
-(void)setEnabled:(BOOL)enabled; | ||
-(bool)enabled; | ||
|
||
-(void)setPowered:(BOOL)powered; | ||
-(bool)powered; | ||
|
||
@end | ||
|
||
%hook CCUILabeledRoundButton | ||
-(void)buttonTapped:(id)arg1 { | ||
|
||
%orig; | ||
|
||
if ([self.title isEqualToString:@"Wi-Fi"]) { | ||
SBWiFiManager *wiFiManager = (SBWiFiManager *)[%c(SBWiFiManager) sharedInstance]; | ||
BOOL enabled = [wiFiManager wiFiEnabled]; | ||
|
||
if(enabled) { | ||
[wiFiManager setWiFiEnabled:NO]; | ||
} | ||
} | ||
/* | ||
//automatically enables itself 2 seconds later | ||
if ([self.title isEqualToString:@"Bluetooth"]) { | ||
BluetoothManager *btoothManager = (BluetoothManager *)[%c(BluetoothManager) sharedInstance]; | ||
BOOL enabled = [btoothManager enabled]; | ||
if(enabled) { | ||
[btoothManager setEnabled:NO]; | ||
[btoothManager setPowered:NO]; | ||
} | ||
}*/ | ||
} | ||
%end |
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Package: com.yourcompany.realcc | ||
Name: RealC�C | ||
Depends: mobilesubstrate | ||
Version: 0.0.1 | ||
Architecture: iphoneos-arm | ||
Description: An awesome MobileSubstrate tweak! | ||
Maintainer: System Administrator | ||
Author: System Administrator | ||
Section: Tweaks |