重複の可能性:
インストールされているすべてのアプリのリストを取得する
インストールされているすべてのアプリ名のリストが必要なアプリ制御システムツールを探しています。ユーザーはそのステータスを変更できます。つまり、ユーザーはそれらをスプリングボードから非表示にできます。はいの場合、どのように可能ですか?助けてください。
重複の可能性:
インストールされているすべてのアプリのリストを取得する
インストールされているすべてのアプリ名のリストが必要なアプリ制御システムツールを探しています。ユーザーはそのステータスを変更できます。つまり、ユーザーはそれらをスプリングボードから非表示にできます。はいの場合、どのように可能ですか?助けてください。
これを試して
-(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リンク