0

重複の可能性:
インストールされているすべてのアプリのリストを取得する

インストールされているすべてのアプリ名のリストが必要なアプリ制御システムツールを探しています。ユーザーはそのステータスを変更できます。つまり、ユーザーはそれらをスプリングボードから非表示にできます。はいの場合、どのように可能ですか?助けてください。

4

1 に答える 1

2

これを試して

-(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リンク

于 2013-01-16T10:14:58.530 に答える