diff options
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r-- | MobileCydia.mm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 754deef..a78e6b0 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -4140,6 +4140,8 @@ static _H<NSMutableSet> Diversions_; return @"format"; else if (selector == @selector(getAllSources)) return @"getAllSources"; + else if (selector == @selector(getApplicationInfo:value:)) + return @"getApplicationInfoValue"; else if (selector == @selector(getKernelNumber:)) return @"getKernelNumber"; else if (selector == @selector(getKernelString:)) @@ -4248,6 +4250,16 @@ static _H<NSMutableSet> Diversions_; [CydiaWebViewController performSelectorOnMainThread:@selector(addDiversion:) withObject:[[[Diversion alloc] initWithFrom:from to:to] autorelease] waitUntilDone:NO]; } +- (NSDictionary *) getApplicationInfo:(NSString *)display value:(NSString *)key { + char path[1024]; + if (SBBundlePathForDisplayIdentifier(SBSSpringBoardServerPort(), [display UTF8String], path) != 0) + return (id) [NSNull null]; + NSDictionary *info([NSDictionary dictionaryWithContentsOfFile:[[NSString stringWithUTF8String:path] stringByAppendingString:@"/Info.plist"]]); + if (info == nil) + return (id) [NSNull null]; + return [info objectForKey:key]; +} + - (NSNumber *) getKernelNumber:(NSString *)name { const char *string([name UTF8String]); |