Results 1 to 3 of 3
  1. #1

    Member Since
    Oct 01, 2012
    Retrive Apps name in iphone device

    I write bellow code to get apps which are installed in iPhone device.But it works on iOS5.1.1 not works on iOS6.1.3.

    Code is:

     BOOL isDir= NO;
        NSMutableArray *applicationsArray=[[NSMutableArray alloc]init];
        NSDictionary *user, *system;
        static NSString *const cacheFileName = @"";
        NSString *relativeCachePath = [[@"Library" stringByAppendingPathComponent: @"Caches"] stringByAppendingPathComponent: cacheFileName];
        NSString *path = [[NSHomeDirectory() stringByAppendingPathComponent: @"../.."] stringByAppendingPathComponent: relativeCachePath];
        if ([[NSFileManager defaultManager] fileExistsAtPath: path isDirectory: &isDir] && !isDir)
            NSDictionary *cacheDict    = [NSDictionary dictionaryWithContentsOfFile: path];
            user = [cacheDict objectForKey: @"User"];
            system=[cacheDict objectForKey:@"System"];
        NSArray *arr1=[[NSArray alloc] initWithArray:[system allKeys]];
        for (int i=0; i<[[system allKeys] count]; i++) {
            [applicationsArray addObject:[[system valueForKey:[arr1 objectAtIndex:i]] valueForKey:@"Path"]];
        NSArray *arr2=[[NSArray alloc] initWithArray:[user allKeys]];
        for (int i=0; i<[[system allKeys] count]; i++) {
            [applicationsArray addObject:[[user valueForKey:[arr2 objectAtIndex:i]] valueForKey:@"Path"]];
       for (int i=0; i<applicationsArray.count; i++)
            NSArray *arr3=[[applicationsArray objectAtIndex:i] componentsSeparatedByCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"/"]];
            NSArray *arr4=[[arr3 lastObject] componentsSeparatedByCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"."]];
            NSMutableDictionary *dict=[[NSMutableDictionary alloc]init];
            [dict setValue:[arr4 objectAtIndex:0] forKey:@"appName"];
            [dict setValue:@"1" forKey:@"State"];
            [self.tableViewArray addObject:dict];

    Please help me out ,how to get app name in iOS6.1.3

    Thanks &Regards,

  2. #2

    Raz0rEdge's Avatar
    Member Since
    Jul 17, 2009
    27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3
    How does this fail in iOS 6?

    Be sure to read the Community Guidelines | The more information you provide, the better answers you get, remember GIGO.

  3. #3

    Mark FX's Avatar
    Member Since
    Aug 13, 2011
    West Sussex, UK
    Sandboxing was introduced from iOS6 and onwards, so you're code won't work for that reason in iOS6.
    You can only access information and data from you're own Apps sandbox only, as as fare as I know there's
    no way to do what you want in the iOS6 system.

    But I'll look into it a bit more, and report back if I can work out a way to do it.

    Regards Mark

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Can not retrive mail on Iphone
    By comovartia in forum iPhone Hardware and Accessories
    Replies: 1
    Last Post: 05-15-2015, 10:51 AM
  2. Retrive Apps name in iphone device
    By manga in forum iOS and Apps
    Replies: 0
    Last Post: 07-18-2013, 07:42 AM
  3. Updating Apps on IOS device and Mac
    By Klaus in forum iOS and Apps
    Replies: 1
    Last Post: 01-07-2012, 11:59 PM
  4. Replies: 1
    Last Post: 07-22-2011, 11:55 PM
  5. iOS Device Users Are Buying 61% More Apps Than a Year Ago
    By OneMoreThing... in forum Apple Rumors and Reports
    Replies: 0
    Last Post: 07-11-2011, 10:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts