├── .gitignore ├── Makefile ├── README.md ├── ShutupShortcuts.plist ├── Tweak.x ├── control ├── depiction.json └── shutupshortcutsprefs ├── Makefile ├── Resources ├── Info.plist ├── Root.plist ├── email@2x.png ├── email@3x.png ├── github@2x.png ├── github@3x.png ├── icon.png ├── icon.xcf ├── icon@2x.png ├── icon@3x.png ├── paypal@2x.png ├── paypal@3x.png ├── reddit@2x.png └── reddit@3x.png ├── SSCRootListController.h ├── SSCRootListController.m └── layout └── Library └── PreferenceLoader └── Preferences └── ShutupShortcutsPrefs.plist /.gitignore: -------------------------------------------------------------------------------- 1 | /.theos 2 | /packages -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | THEOS_DEVICE_IP = 192.168.4.96 2 | GO_EASY_ON_ME = 1 3 | 4 | TARGET := iphone:clang:latest:7.0 5 | INSTALL_TARGET_PROCESSES = SpringBoard 6 | 7 | PACKAGE_VERSION = $(THEOS_PACKAGE_BASE_VERSION) 8 | #PACKAGE_VERSION = $(THEOS_PACKAGE_BASE_VERSION)-$(VERSION.INC_BUILD_NUMBER)$(VERSION.EXTRAVERSION) 9 | 10 | ARCHS = arm64 arm64e 11 | SDKVERSION = 13.3 12 | 13 | TWEAK_NAME = ShutupShortcuts 14 | 15 | $(TWEAK_NAME)_FILES = Tweak.x 16 | $(TWEAK_NAME)_CFLAGS = -fobjc-arc 17 | $(TWEAK_NAME)_EXTRA_FRAMEWORKS += Cephei 18 | 19 | include $(THEOS)/makefiles/common.mk 20 | include $(THEOS_MAKE_PATH)/tweak.mk 21 | SUBPROJECTS += shutupshortcutsprefs 22 | include $(THEOS_MAKE_PATH)/aggregate.mk 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ShutupShortcuts 2 | 3 | iOS 14 jailbreak tweak to disable automation notifications from Shortcuts 4 | -------------------------------------------------------------------------------- /ShutupShortcuts.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.springboard" ); }; } 2 | -------------------------------------------------------------------------------- /Tweak.x: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #define TWEAK_NAME @"ShutupShortcuts" 5 | #define BUNDLE [NSString stringWithFormat:@"com.wrp1002.%@", [TWEAK_NAME lowercaseString]] 6 | 7 | 8 | // =========================== Preference vars =========================== 9 | 10 | bool enabled; 11 | bool disableAll; 12 | NSString *automationStr; 13 | HBPreferences *preferences; 14 | 15 | // =========================== Debugging stuff =========================== 16 | 17 | @interface Debug : NSObject 18 | +(UIWindow*)GetKeyWindow; 19 | +(void)ShowAlert:(NSString *)msg; 20 | +(void)Log:(NSString *)msg; 21 | +(void)LogException:(NSException *)e; 22 | +(void)SpringBoardReady; 23 | @end 24 | 25 | @implementation Debug 26 | static bool springboardReady = false; 27 | 28 | +(UIWindow*)GetKeyWindow { 29 | UIWindow *foundWindow = nil; 30 | NSArray *windows = [[UIApplication sharedApplication]windows]; 31 | for (UIWindow *window in windows) { 32 | if (window.isKeyWindow) { 33 | foundWindow = window; 34 | break; 35 | } 36 | } 37 | return foundWindow; 38 | } 39 | 40 | // Shows an alert box. Used for debugging 41 | +(void)ShowAlert:(NSString *)msg { 42 | if (!springboardReady) return; 43 | 44 | UIAlertController * alert = [UIAlertController 45 | alertControllerWithTitle:@"Alert" 46 | message:msg 47 | preferredStyle:UIAlertControllerStyleAlert]; 48 | 49 | //Add Buttons 50 | UIAlertAction* dismissButton = [UIAlertAction 51 | actionWithTitle:@"Cool!" 52 | style:UIAlertActionStyleDefault 53 | handler:^(UIAlertAction * action) { 54 | //Handle dismiss button action here 55 | 56 | }]; 57 | 58 | //Add your buttons to alert controller 59 | [alert addAction:dismissButton]; 60 | 61 | [[self GetKeyWindow].rootViewController presentViewController:alert animated:YES completion:nil]; 62 | } 63 | 64 | // Show log with tweak name as prefix for easy grep 65 | +(void)Log:(NSString *)msg { 66 | NSLog(@"%@: %@", TWEAK_NAME, msg); 67 | } 68 | 69 | // Log exception info 70 | +(void)LogException:(NSException *)e { 71 | NSLog(@"%@: NSException caught", TWEAK_NAME); 72 | NSLog(@"%@: Name:%@", TWEAK_NAME, e.name); 73 | NSLog(@"%@: Reason:%@", TWEAK_NAME, e.reason); 74 | } 75 | 76 | +(void)SpringBoardReady { 77 | springboardReady = true; 78 | } 79 | @end 80 | 81 | 82 | // =========================== Classes / Functions =========================== 83 | 84 | 85 | @interface BBBulletin : NSObject 86 | @property (nonatomic,readonly) NSString * sectionDisplayName; 87 | @property (nonatomic,copy) NSString * sectionID; 88 | @property (nonatomic,copy) NSString * title; 89 | @property (nonatomic,copy) NSString * subtitle; 90 | @property (nonatomic,copy) NSString * message; 91 | @end 92 | 93 | 94 | // =========================== Hooks =========================== 95 | 96 | %hook SpringBoard 97 | 98 | // Called when springboard is finished launching 99 | -(void)applicationDidFinishLaunching:(id)application { 100 | %orig; 101 | [Debug SpringBoardReady]; 102 | } 103 | 104 | %end 105 | 106 | %hook NCBulletinNotificationSource 107 | // Not sure if this is needed. Doesn't seem to get called 108 | /*- (void)observer:(id)arg1 addBulletin:(id)arg2 forFeed:(NSUInteger)arg3 { 109 | %orig; 110 | //[Debug Log:@"- (void)observer:(id)arg1 addBulletin:(id)arg2 forFeed:(NSUInteger)arg3;"]; 111 | [Debug Log:[NSString stringWithFormat:@"bulletin:%@", arg2]]; 112 | }*/ 113 | 114 | - (void)observer:(id)arg1 addBulletin:(id)arg2 forFeed:(NSUInteger)arg3 playLightsAndSirens:(BOOL)arg4 withReply:(id /* CDUnknownBlockType */)arg5 { 115 | //[Debug Log:@"- (void)observer:(id)arg1 addBulletin:(id)arg2 forFeed:(NSUInteger)arg3;"]; 116 | //[Debug Log:[NSString stringWithFormat:@"bundleID: %@ title: %@ subtitle: %@ message: %@", [arg2 sectionID], [arg2 title], [arg2 subtitle], [arg2 message]]]; 117 | [Debug Log:automationStr]; 118 | [Debug Log:[arg2 message]]; 119 | 120 | if (!enabled || ![[arg2 sectionID] isEqualToString:@"com.apple.shortcuts"]) 121 | return %orig; 122 | 123 | if ([[arg2 message] isEqualToString:automationStr] || disableAll) 124 | return; 125 | 126 | %orig; 127 | } 128 | %end 129 | 130 | 131 | // =========================== Constructor stuff =========================== 132 | 133 | %ctor { 134 | [Debug Log:[NSString stringWithFormat:@"============== %@ started ==============", TWEAK_NAME]]; 135 | 136 | preferences = [[HBPreferences alloc] initWithIdentifier:BUNDLE]; 137 | [preferences registerBool:&enabled default:true forKey:@"kEnabled"]; 138 | [preferences registerBool:&disableAll default:false forKey:@"kDisableAll"]; 139 | [preferences registerObject:&automationStr default:@"Running your automation" forKey:@"kAutomationStr"]; 140 | 141 | } 142 | -------------------------------------------------------------------------------- /control: -------------------------------------------------------------------------------- 1 | Package: com.wrp1002.shutupshortcuts 2 | Name: ShutupShortcuts 3 | Version: 1.1.0 4 | Architecture: iphoneos-arm 5 | Description: Stop Shutcut notifications! 6 | Maintainer: Wes 7 | Author: Wes 8 | Section: Tweaks 9 | Depends: mobilesubstrate (>= 0.9.5000), ws.hbang.common (>= 1.2) 10 | -------------------------------------------------------------------------------- /depiction.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "ShutupShortcuts", 3 | "description": "This tweak disables the annoying notifications from shortcut automations.", 4 | "compatibility": "Made for iOS 14", 5 | "screenshots": ["screenshot1.gif", "screenshot2.png"], 6 | "changelog": [ 7 | { 8 | "version": "1.0.0", 9 | "changes": ["Initial Release"] 10 | }, 11 | { 12 | "version": "1.1.0", 13 | "changes": ["Added option to customize notification message text to block"] 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /shutupshortcutsprefs/Makefile: -------------------------------------------------------------------------------- 1 | TARGET := iphone:clang:latest:7.0 2 | 3 | include $(THEOS)/makefiles/common.mk 4 | 5 | BUNDLE_NAME = ShutupShortcutsPrefs 6 | ARCHS = arm64 arm64e 7 | 8 | $(BUNDLE_NAME)_FILES = SSCRootListController.m 9 | $(BUNDLE_NAME)_FRAMEWORKS = UIKit 10 | $(BUNDLE_NAME)_PRIVATE_FRAMEWORKS = Preferences 11 | $(BUNDLE_NAME)_INSTALL_PATH = /Library/PreferenceBundles 12 | $(BUNDLE_NAME)_CFLAGS = -fobjc-arc 13 | $(BUNDLE_NAME)_EXTRA_FRAMEWORKS = Cephei CepheiPrefs 14 | 15 | include $(THEOS_MAKE_PATH)/bundle.mk 16 | -------------------------------------------------------------------------------- /shutupshortcutsprefs/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ShutupShortcutsPrefs 9 | CFBundleIdentifier 10 | com.wrp1002.shutupshortcutsprefs 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1.0 21 | NSPrincipalClass 22 | SSCRootListController 23 | 24 | 25 | -------------------------------------------------------------------------------- /shutupshortcutsprefs/Resources/Root.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | items 6 | 7 | 8 | cell 9 | PSGroupCell 10 | label 11 | Options 12 | footerText 13 | Only notifications that contain "Running your automation" are blocked by default. You can changed the text to filter by, but it is case sensitive and must be the exact notification body text. 14 | 15 | 16 | cell 17 | PSSwitchCell 18 | label 19 | Enabled 20 | key 21 | kEnabled 22 | id 23 | kEnabled 24 | default 25 | 26 | defaults 27 | com.wrp1002.shutupshortcuts 28 | PostNotification 29 | com.wrp1002.shutupshortcuts/ReloadPrefs 30 | 31 | 32 | cell 33 | PSSwitchCell 34 | label 35 | Disable all notifications 36 | key 37 | kDisableAll 38 | id 39 | kDisableAll 40 | default 41 | 42 | defaults 43 | com.wrp1002.shutupshortcuts 44 | PostNotification 45 | com.wrp1002.shutupshortcuts/ReloadPrefs 46 | 47 | 48 | cell 49 | PSEditTextCell 50 | label 51 | Notification text: 52 | key 53 | kAutomationStr 54 | id 55 | kAutomationStr 56 | 57 | autoCaps 58 | sentences 59 | placeholder 60 | Exact text to match 61 | 62 | default 63 | Running your automation 64 | defaults 65 | com.wrp1002.shutupshortcuts 66 | PostNotification 67 | com.wrp1002.shutupshortcuts/ReloadPrefs 68 | 69 | 70 | 71 | 72 | cell 73 | PSGroupCell 74 | footerText 75 | Respringing is NOT needed for changes to take effect 76 | 77 | 78 | cell 79 | PSButtonCell 80 | label 81 | Reset settings 82 | action 83 | ResetSettings 84 | isDestructive 85 | 86 | confirmation 87 | 88 | prompt 89 | Are you sure? This will respring your device. 90 | title 91 | Reset! 92 | cancelTitle 93 | Cancel 94 | 95 | 96 | 97 | cell 98 | PSButtonCell 99 | label 100 | Respring 101 | action 102 | Respring 103 | 104 | 105 | 106 | 107 | cell 108 | PSGroupCell 109 | label 110 | Developer 111 | 112 | 113 | cell 114 | PSButtonCell 115 | label 116 | Email Me 117 | action 118 | OpenEmail 119 | icon 120 | email.png 121 | 122 | 123 | cell 124 | PSButtonCell 125 | label 126 | Reddit 127 | action 128 | OpenReddit 129 | icon 130 | reddit.png 131 | 132 | 133 | cell 134 | PSButtonCell 135 | label 136 | Source Code 137 | action 138 | OpenGithub 139 | icon 140 | github.png 141 | 142 | 143 | cell 144 | PSButtonCell 145 | label 146 | Donate 147 | action 148 | OpenPaypal 149 | icon 150 | paypal.png 151 | 152 | 153 | 154 | 155 | 156 | title 157 | ShutupShortcuts 158 | 159 | 160 | -------------------------------------------------------------------------------- /shutupshortcutsprefs/Resources/email@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wrp1002/ShutupShortcuts/5777e55f303229a714645df39296e0292fd97f9b/shutupshortcutsprefs/Resources/email@2x.png -------------------------------------------------------------------------------- /shutupshortcutsprefs/Resources/email@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wrp1002/ShutupShortcuts/5777e55f303229a714645df39296e0292fd97f9b/shutupshortcutsprefs/Resources/email@3x.png -------------------------------------------------------------------------------- /shutupshortcutsprefs/Resources/github@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wrp1002/ShutupShortcuts/5777e55f303229a714645df39296e0292fd97f9b/shutupshortcutsprefs/Resources/github@2x.png -------------------------------------------------------------------------------- /shutupshortcutsprefs/Resources/github@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wrp1002/ShutupShortcuts/5777e55f303229a714645df39296e0292fd97f9b/shutupshortcutsprefs/Resources/github@3x.png -------------------------------------------------------------------------------- /shutupshortcutsprefs/Resources/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wrp1002/ShutupShortcuts/5777e55f303229a714645df39296e0292fd97f9b/shutupshortcutsprefs/Resources/icon.png -------------------------------------------------------------------------------- /shutupshortcutsprefs/Resources/icon.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wrp1002/ShutupShortcuts/5777e55f303229a714645df39296e0292fd97f9b/shutupshortcutsprefs/Resources/icon.xcf -------------------------------------------------------------------------------- /shutupshortcutsprefs/Resources/icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wrp1002/ShutupShortcuts/5777e55f303229a714645df39296e0292fd97f9b/shutupshortcutsprefs/Resources/icon@2x.png -------------------------------------------------------------------------------- /shutupshortcutsprefs/Resources/icon@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wrp1002/ShutupShortcuts/5777e55f303229a714645df39296e0292fd97f9b/shutupshortcutsprefs/Resources/icon@3x.png -------------------------------------------------------------------------------- /shutupshortcutsprefs/Resources/paypal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wrp1002/ShutupShortcuts/5777e55f303229a714645df39296e0292fd97f9b/shutupshortcutsprefs/Resources/paypal@2x.png -------------------------------------------------------------------------------- /shutupshortcutsprefs/Resources/paypal@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wrp1002/ShutupShortcuts/5777e55f303229a714645df39296e0292fd97f9b/shutupshortcutsprefs/Resources/paypal@3x.png -------------------------------------------------------------------------------- /shutupshortcutsprefs/Resources/reddit@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wrp1002/ShutupShortcuts/5777e55f303229a714645df39296e0292fd97f9b/shutupshortcutsprefs/Resources/reddit@2x.png -------------------------------------------------------------------------------- /shutupshortcutsprefs/Resources/reddit@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wrp1002/ShutupShortcuts/5777e55f303229a714645df39296e0292fd97f9b/shutupshortcutsprefs/Resources/reddit@3x.png -------------------------------------------------------------------------------- /shutupshortcutsprefs/SSCRootListController.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | #import 5 | 6 | @interface SSCRootListController : PSListController 7 | @property (nonatomic, retain) NSMutableDictionary *savedSpecifiers; 8 | @end 9 | -------------------------------------------------------------------------------- /shutupshortcutsprefs/SSCRootListController.m: -------------------------------------------------------------------------------- 1 | #include "SSCRootListController.h" 2 | 3 | @implementation SSCRootListController 4 | 5 | - (NSArray *)specifiers { 6 | if (!_specifiers) { 7 | _specifiers = [self loadSpecifiersFromPlistName:@"Root" target:self]; 8 | } 9 | 10 | NSArray *chosenIDs = @[@"kAutomationStr"]; 11 | self.savedSpecifiers = (self.savedSpecifiers) ?: [[NSMutableDictionary alloc] init]; 12 | for(PSSpecifier *specifier in _specifiers) { 13 | if([chosenIDs containsObject:[specifier propertyForKey:@"id"]]) 14 | [self.savedSpecifiers setObject:specifier forKey:[specifier propertyForKey:@"id"]]; 15 | } 16 | 17 | return _specifiers; 18 | } 19 | 20 | -(void)_returnKeyPressed:(id)arg1 { 21 | [self.view endEditing:YES]; 22 | } 23 | 24 | -(void)setPreferenceValue:(id)value specifier:(PSSpecifier *)specifier { 25 | [super setPreferenceValue:value specifier:specifier]; 26 | 27 | NSString *key = [specifier propertyForKey:@"key"]; 28 | if([key isEqualToString:@"kDisableAll"]) { 29 | if([value boolValue]) 30 | [self removeSpecifierID:@"kAutomationStr" animated:YES]; 31 | else 32 | [self insertSpecifier:self.savedSpecifiers[@"kAutomationStr"] afterSpecifierID:@"kDisableAll" animated:YES]; 33 | } 34 | } 35 | 36 | -(void)reloadSpecifiers { 37 | [super reloadSpecifiers]; 38 | 39 | HBPreferences *prefs = [[HBPreferences alloc] initWithIdentifier:@"com.wrp1002.shutupshortcuts"]; 40 | if([prefs boolForKey:@"kDisableAll"]) 41 | [self removeSpecifierID:@"kAutomationStr" animated:NO]; 42 | } 43 | 44 | - (void)loadView { 45 | [super loadView]; 46 | ((UITableView *)[self table]).keyboardDismissMode = UIScrollViewKeyboardDismissModeOnDrag; 47 | [self reloadSpecifiers]; 48 | NSLog(@"ShutupShortcuts: loadview()"); 49 | } 50 | 51 | -(void)Respring { 52 | [HBRespringController respring]; 53 | } 54 | 55 | -(void)ResetSettings { 56 | HBPreferences *prefs = [[HBPreferences alloc] initWithIdentifier: @"com.wrp1002.shutupshortcuts"]; 57 | [prefs removeAllObjects]; 58 | [self Respring]; 59 | } 60 | 61 | -(void)OpenGithub { 62 | UIApplication *application = [UIApplication sharedApplication]; 63 | NSURL *URL = [NSURL URLWithString:@"https://github.com/wrp1002/ShutupShortcuts"]; 64 | [application openURL:URL options:@{} completionHandler:^(BOOL success) {}]; 65 | } 66 | 67 | -(void)OpenPaypal { 68 | UIApplication *application = [UIApplication sharedApplication]; 69 | NSURL *URL = [NSURL URLWithString:@"https://paypal.me/wrp1002"]; 70 | [application openURL:URL options:@{} completionHandler:^(BOOL success) {}]; 71 | } 72 | 73 | -(void)OpenReddit { 74 | UIApplication *application = [UIApplication sharedApplication]; 75 | NSURL *URL = [NSURL URLWithString:@"https://reddit.com/u/wes_hamster"]; 76 | [application openURL:URL options:@{} completionHandler:^(BOOL success) {}]; 77 | } 78 | 79 | -(void)OpenEmail { 80 | UIApplication *application = [UIApplication sharedApplication]; 81 | NSURL *URL = [NSURL URLWithString:@"mailto:wes.hamster@gmail.com?subject=ShutupShortcuts"]; 82 | [application openURL:URL options:@{} completionHandler:^(BOOL success) {}]; 83 | } 84 | 85 | @end 86 | -------------------------------------------------------------------------------- /shutupshortcutsprefs/layout/Library/PreferenceLoader/Preferences/ShutupShortcutsPrefs.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | entry 6 | 7 | bundle 8 | ShutupShortcutsPrefs 9 | cell 10 | PSLinkCell 11 | detail 12 | SSCRootListController 13 | icon 14 | icon.png 15 | isController 16 | 17 | label 18 | ShutupShortcuts 19 | 20 | 21 | 22 | --------------------------------------------------------------------------------