-
Notifications
You must be signed in to change notification settings - Fork 1
/
Tweak.x
39 lines (29 loc) · 1.01 KB
/
Tweak.x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#import <UIKit/UIKit.h>
%hook SpringBoard
-(void) applicationDidFinishLaunching:(id)arg {
%orig(arg);
UIAlertView *lookWhatWorks = [[UIAlertView alloc] initWithTitle:@"PrivacyGuard Tweak"
message:@"Your privacy guard is running 😎"
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[lookWhatWorks show];
}
%end
%hook AVCaptureSession
// Hooking an instance method with no arguments.
-(void) startRunning {
NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIdentifier"];
NSLog(@"PrivacyGuard startRunning: %@", appName);
UIView *statusBar = [[UIApplication sharedApplication] valueForKey:@"statusBar"];
statusBar.backgroundColor = [UIColor greenColor];
%orig;
}
-(void) stopRunning {
NSLog(@"PrivacyGuard stopRunning");
UIView *statusBar = [[UIApplication sharedApplication] valueForKey:@"statusBar"];
statusBar.backgroundColor = [UIColor clearColor];
%orig;
}
// Always make sure you clean up after yourself; Not doing so could have grave consequences!
%end