0

Possible Duplicate:
Get list of all installed apps

I am looking for the apps control system tool, in which I want a list of all installed apps name and user will allowed to change there status, that is user can hide those from the springboard. can it be possible if yes then how? plz help me out?

Community
  • 1
  • 1
junaidsidhu
  • 3,539
  • 1
  • 27
  • 49
  • see here http://iphonedevsdk.com/forum/iphone-sdk-development/22289-possible-retrieve-these-information.html – Girish Jan 16 '13 at 09:52

1 Answers1

2

Try this

-(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;
}

This will gives u array of installed apps.

This link also helps u Link

Satish Azad
  • 2,302
  • 1
  • 16
  • 35
  • Does not work. The file that the if-statement needs to find in order to evaluate as true, does not exist. cacheDict and user are thus never set and returned as null. Maybe the cacheFileName or relativeCachePath has changed perhaps? – HGDev Jun 25 '14 at 03:29
  • above code only works for jailbroken devices – Mehul Thakkar Nov 10 '14 at 06:39
  • 1
    ion iOS8 the com.apple.mobile.installation.plist is deleted with what it's replaced please? – Dhekra Zaied Nov 21 '14 at 14:35