diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2013-02-06 12:04:22 +0000 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2013-02-06 12:04:26 +0000 |
commit | 7f9e55ed1a0297c7fd41c333438cccbd2115195c (patch) | |
tree | 92dcf54d18060db0b839fd3fd1ba9f39bdd2b640 | |
parent | ee2ee18b3e415082a686e7b7ce9297d12e031bf9 (diff) |
Only attempt Weather app fix if caching Container.v1.1.5
-rw-r--r-- | extrainst_.mm | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/extrainst_.mm b/extrainst_.mm index 5a473b3..2554c0e 100644 --- a/extrainst_.mm +++ b/extrainst_.mm @@ -133,14 +133,17 @@ int main(int argc, const char *argv[]) { if (kCFCoreFoundationVersionNumber >= 700) { // XXX: iOS 6.x NSString *home(@"/var/mobile"); NSString *plist([NSString stringWithFormat:@"%@/Library/Caches/com.apple.mobile.installation.plist", home]); - NSDictionary *cache([NSDictionary dictionaryWithContentsOfFile:plist]); - NSObject *system([cache objectForKey:@"System"]); - NSDictionary *dictionary([system dictionaryOfInfoDictionaries]); - NSDictionary *weather([dictionary objectForKey:@"com.apple.weather"]); - if (weather != nil && [weather objectForKey:@"Container"] == nil) - FixCache(home, plist); + NSArray *cached([cache objectForKey:@"MICachedKeys"]); + if (cached != nil && [cached containsObject:@"Container"]) { + NSObject *system([cache objectForKey:@"System"]); + NSDictionary *dictionary([system dictionaryOfInfoDictionaries]); + NSDictionary *weather([dictionary objectForKey:@"com.apple.weather"]); + + if (weather != nil && [weather objectForKey:@"Container"] == nil) + FixCache(home, plist); + } } [pool release]; |