Created
October 24, 2015 20:53
-
-
Save ninjaprawn/56c48d9b6405dccb900c to your computer and use it in GitHub Desktop.
random attempt to record screen
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
%hook BSPlatform | |
- (BOOL)isInternalInstall { | |
return YES; | |
} | |
%end | |
%hook SpringBoard | |
-(void)applicationDidFinishLaunching:(id)application { | |
%orig(); | |
//[self _handleCommandTab]; | |
CFPreferencesSetAppValue(CFSTR("SBDisableRecordScreenButton"), kCFBooleanTrue, CFSTR("com.apple.springboard")); | |
Boolean keyExists; | |
Boolean enabled = CFPreferencesGetAppBooleanValue(CFSTR("SBDisableRecordScreenButton"), CFSTR("com.apple.springboard"), &keyExists); | |
//CFPreferencesSetAppValue(CFSTR("SBDisableRecordScreenButton"), !enabled, CFSTR("com.apple.springboard")); | |
HBLogDebug(@"Enabled? - %@", enabled ? @"YES" : @"NO"); | |
} | |
%end | |
%hook SBPlatformController | |
- (_Bool)isInternalInstall { | |
return YES; | |
} | |
- (_Bool)isDeveloperInstall { | |
return YES; | |
} | |
%end | |
%hook SBCCRecordScreenShortcut | |
+(BOOL)isSupported:(int)arg1 { | |
Boolean keyExists; | |
Boolean enabled = CFPreferencesGetAppBooleanValue(CFSTR("SBDisableRecordScreenButton"), CFSTR("com.apple.springboard"), &keyExists); | |
HBLogDebug(@"Enabled? - %@", enabled ? @"YES" : @"NO"); | |
return YES; | |
} | |
%end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment