forked from EthanRDoesMC/Truecuts
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathTweak.xm
39 lines (31 loc) · 765 Bytes
/
Tweak.xm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
@interface WFTrigger : NSObject
+(BOOL)isAllowedToRunAutomatically;
@end
@interface NCNotificationContent : NSObject
- (NSString *)message;
- (NSString *)title;
@end
@interface NCNotificationRequest : NSObject
- (NSString *)sectionIdentifier;
- (NCNotificationContent *)content;
@end
%hook NCNotificationDispatcher
-(void)postNotificationWithRequest:(NCNotificationRequest*)arg1 {
if (!([[[arg1 content] title] containsString:@"Automation"] || [[[arg1 content] message] containsString:@"automation"])) {
%orig;
}
}
%end
%hook WFTrigger
+(BOOL)isAllowedToRunAutomatically {
return YES;
}
%end
@interface WFSharingSettings : NSObject
+(BOOL)shortcutFileSharingEnabled;
@end
%hook WFSharingSettings
+(BOOL)shortcutFileSharingEnabled {
return YES;
}
%end