Skip to content

Instantly share code, notes, and snippets.

@yur1xpp
yur1xpp / open_shortcut.m
Created July 4, 2020 11:57 — forked from CPDigitalDarkroom/open_shortcut.m
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],