title: ALAssetsLibrary doesn't retrieve image URL's in physical iOS 4.1 iPod device?
body: <p>I am trying to access iPhone's photo album photo images through ALAssetsLibrary. I could access all the photo albums and get the asset URL of each images on Simulator, via the following code:</p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
  
      void (^assetEnumerator)(struct ALAsset *, NSUInteger, BOOL *) = ^(ALAsset *result, NSUInteger index, BOOL *stop) {
          if(result != NULL) {
              NSLog(@"See Asset: %@", result);
  
              // assets is a NSMutableArray..            
              [assets addObject:result];
  
              // Here storing the asset's image URL's in NSMutablearray urlStoreArr
              NSURL *url = [[result defaultRepresentation] url];
              [urlStoreArr addObject:url]; 
          }
      };
  
      void (^assetGroupEnumerator)(struct ALAssetsGroup *, BOOL *) =  ^(ALAssetsGroup *group, BOOL *stop) 
      {
          if(group != nil) {
              [group enumerateAssetsUsingBlock:assetEnumerator];
          }
  
          [self.activity stopAnimating];
          [self.activity setHidden:YES];
      };
  
      assets = [[NSMutableArray alloc] init];
      library = [[ALAssetsLibrary alloc] init];
  
      [library enumerateGroupsWithTypes:ALAssetsGroupAlbum usingBlock:assetGroupEnumerator failureBlock: ^(NSError *error) {
          NSLog(@"Failure");
      }];
  
      urlStoreArr = [[NSMutableArray alloc] init];
  }
  
  -(void) GetURLImages
  {
      for (int i=0; i&lt;[urlStoreArr count]; i++)
      {
          // To get the each image URL here...
          NSString *str = [urlStoreArr objectAtIndex:i];
          NSLog(@"str: %@",str);
      }
  }
  </code></pre>
  
  <p>It works as expected on iOS 4.0 Simulator, i.e, getting all the images URL's (ex: <code>assets-library://asset/asset.JPG?id=1000000002&amp;ext=JPG</code>). But it doesn't retrieve image URL's on iPod 4.1 device. What could be the problem here? Can someone please help me fix so the code could also work on iPod? I'm totally confused.</p>
  
  <p>Thank you!</p>