Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
39 lines (29 sloc)
1.01 KB
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
#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 |