how to get the list of apps Name installed in the iPhone
本问题已经有最佳答案,请猛点这里访问。
Possible Duplicate:
Get list of all installed apps
我正在寻找应用程序控制系统工具,在该工具中,我想要所有已安装应用程序名称的列表,并且用户将被允许在此更改状态,也就是说,用户可以将其隐藏在跳板中。如果可以,那么怎么可能?请帮我吗?
试试这个
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | -(NSArray *) installedApps { BOOL isDir enter code here= NO; NSDictionary *cacheDienter code herect; NSDictionary *user; static NSString *const cacheFileName = @"com.apple.mobile.installation.plist"; NSString *relativeCachePath = [[@"Library" stringByAppendingPathComponent: @"Caches"] stringByAppendingPathComponent: cacheFileName]; NSString *path = [[NSHomeDirectory() stringByAppendingPathComponent: @"../.."] stringByAppendingPathComponent: relativeCachePath]; if ([[NSFileManager defaultManager] fileExistsAtPath: path isDirectory: &isDir] && !isDir) // Ensure that file exists { cacheDict = [NSDictionary dictionaryWithContentsOfFile: path]; user = [cacheDict objectForKey: @"System"]; // Then all the user (App Store /var/mobile/Applications) apps } //NSLog(@"Installed Applications = %@",[user allKeys]); //return [user allKeys]; return nil; } |
这将为您提供一系列已安装的应用程序。
此链接也有助于u链接