Skip to content

Instantly share code, notes, and snippets.

@ninjaprawn
Created October 24, 2015 20:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ninjaprawn/56c48d9b6405dccb900c to your computer and use it in GitHub Desktop.
Save ninjaprawn/56c48d9b6405dccb900c to your computer and use it in GitHub Desktop.
random attempt to record screen
%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