Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeajames committed Jan 22, 2018
1 parent a6d04cc commit a0b0b88
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Makefile
@@ -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"
1 change: 1 addition & 0 deletions RealCC.plist
@@ -0,0 +1 @@
{ Filter = { Bundles = ( "com.apple.springboard" ); }; }
47 changes: 47 additions & 0 deletions Tweak.xm
@@ -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.
9 changes: 9 additions & 0 deletions control
@@ -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

0 comments on commit a0b0b88

Please sign in to comment.