-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTweak.x
More file actions
33 lines (30 loc) · 762 Bytes
/
Tweak.x
File metadata and controls
33 lines (30 loc) · 762 Bytes
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
%config(generator=MobileSubstrate)
%group DAEAS
%hook ASWBXMLPolicy
-(void)_cleanUpPolicyData:(NSMutableDictionary *)policy {
if ([policy respondsToSelector:@selector(removeAllObjects)]) {
NSLog(@"ExchangePolicyCleaner is taking out the trash: %@", policy);
[policy removeAllObjects];
}
%orig;
}
%end
%end
%hook NSBundle
- (BOOL)load {
BOOL success = %orig;
if (success && (
[self.bundleIdentifier isEqualToString:@"com.apple.DAEAS"] || // iOS 5/6/7/8
[self.bundleIdentifier isEqualToString:@"com.yourcompany.DAEAS"] // iOS 4
)) {
static dispatch_once_t once;
dispatch_once(&once, ^{
%init(DAEAS);
});
}
return success;
}
%end
%ctor {
%init;
}