如何获取iPhone设备上所有已安装应用的详细信息,以及后台运行的所有应用程序的详细信息?提前谢谢。
答案 0 :(得分:3)
是的,我们可以获取已安装的应用程序列表。
NSDictionary *cacheDict;
NSDictionary *user;
static NSString *const cacheFileName = @"com.apple.mobile.installation.plist";
NSString *relativeCachePath = [[@"Library" stringByAppendingPathComponent: @"Caches"] stringByAppendingPathComponent: cacheFileName];
NSString *path = [[NSHomeDirectory() stringByAppendingPathComponent: @"../.."] stringByAppendingPathComponent: relativeCachePath];
cacheDict = [NSDictionary dictionaryWithContentsOfFile: path];
user = [cacheDict objectForKey: @"User"];
用户Dict将向我们提供有关已安装应用程序的所有信息。