title: iPhone PhotosByLocation example not working - how to fix blank screen?
body: <p>I'm trying to run <a href="http://developer.apple.com/library/ios/#samplecode/PhotosByLocation/Listings/ReadMe_txt.html" rel="nofollow">PhotosByLocation iOS example</a> to familiarize myself with the assetsLibrary framework and noticed that I get a blank screen with "Albums" on top. The location services icon in the top right is showing, and I did give the app access to the device's photos and verified that the access exists.</p>
  
  <p>I tested the project on two devices, and still cannot seem to get it to work. </p>
  
  <p>I'm using xCode 4.6 and am building for iOS 6.1 . <strong>Has anyone else ran into an issue where PhotosByLocation gives you a blank black screen with "Albums" on top of it, but nothing else? How did you fix it?</strong></p>
  
  <p>I've narrowed the issue down to this block of code - no groups are added in the callback, and as a result when the table view reloads itself, it has no cells. I don't know why there are no groups added. </p>
  
  <pre><code>    ALAssetsLibraryGroupsEnumerationResultsBlock listGroupBlock = ^(ALAssetsGroup *group, BOOL *stop) {
  
          if (group) {
              [groups addObject:group];
          } else {
              // Add the favorites group if it has any elements
              if (!favoriteAssets) {
                  favoriteAssets = [[FavoriteAssets alloc] init];
              }
              if ([favoriteAssets count] &gt; 0) {
  //no groups are added
                  [groups addObject:favoriteAssets];
              }
  
              [self.tableView performSelectorOnMainThread:@selector(reloadData) withObject:nil waitUntilDone:NO];
          }
      };
  </code></pre>