diff options
Diffstat (limited to 'MobileSafety.mm')
-rw-r--r-- | MobileSafety.mm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/MobileSafety.mm b/MobileSafety.mm index caa12db..e4c23f9 100644 --- a/MobileSafety.mm +++ b/MobileSafety.mm @@ -51,6 +51,7 @@ MSClassHook(AAAccountManager) MSMetaClassHook(AAAccountManager) MSClassHook(BBSectionInfo) +MSClassHook(BKSApplicationLaunchSettings) MSClassHook(SBAlertItemsController) MSClassHook(SBButtonBar) @@ -282,3 +283,17 @@ MSInstanceMessageHook0(void, SBStatusBarTimeView, tile) { MSInstanceMessageHook0(BOOL, BBSectionInfo, showsInNotificationCenter) { return NO; } + + +// on iOS 6.0, Apple split parts of SpringBoard into a daemon called backboardd, including app launches +// in order to allow safe mode to propogate into applications, we need to then tell backboardd here +// XXX: (all of this should be replaced, however, with per-process launchd-mediated exception handling) + +MSInstanceMessageHook1(void, BKSApplicationLaunchSettings, setEnvironment, NSDictionary *, original) { + if (original == nil) + return MSOldCall(nil); + + NSMutableDictionary *modified([original mutableCopy]); + [modified setObject:@"1" forKey:@"_MSSafeMode"]; + return MSOldCall(modified); +} |