Skip to content

Instantly share code, notes, and snippets.

View CPDigitalDarkroom's full-sized avatar

Carlos Perez CPDigitalDarkroom

View GitHub Profile
@CPDigitalDarkroom
CPDigitalDarkroom / generateIconImageWithInfo.m
Created November 13, 2019 20:51
Generate icon image on iOS 13
struct SBIconImageInfo {
struct CGSize size;
double scale;
double continuousCornerRadius;
};
- (UIImage *)iconImageForIdentifier:(NSString *)identifier {
SBIconController *iconController = [NSClassFromString(@"SBIconController") sharedInstance];
SBIcon *icon = [iconController.model expectedIconForDisplayIdentifier:identifier];
@CPDigitalDarkroom
CPDigitalDarkroom / open_shortcut.m
Created October 20, 2019 21:06
Open an app shortcut programmatically
- (void)openShortcut:(SBSApplicationShortcutItem *)shortcutItem {
UIHandleApplicationShortcutAction *openAction = [[UIHandleApplicationShortcutAction alloc] initWithSBSShortcutItem:shortcutItem];
NSDictionary *activationOptions = @{
@"__ActivateSuspended" : [NSNumber numberWithBool:(shortcutItem.activationMode == 1)],
@"__Actions": @[
openAction
],
@"__PromptUnlockDevice" : [NSNumber numberWithBool:YES],
@CPDigitalDarkroom
CPDigitalDarkroom / disabledSayWhat?.txt
Created August 19, 2015 20:20
Get past disabled on iOS using cycript
cycript -p SpringBoard
//Not sure if this one was required but I did run it first so theres that
[choose(SBFDeviceLockController)[0] _clearUnblockTimer];
[choose(SBFDeviceLockController)[0] _clearBlockedState];