title: What is iCloud doing during the initial sync?
body: <p>I want to sync my Core Data shoebox app with iCloud. An example project Apple provides shows how to set up the NSPersistentStoreCoordinator to enable iCloud. The code roughly looks like this:</p>
  
  <pre><code>persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel: [self managedObjectModel]];
  
  NSDictionary* options = [NSDictionary dictionaryWithObjectsAndKeys:@"com.company.app", NSPersistentStoreUbiquitousContentNameKey, cloudURL, NSPersistentStoreUbiquitousContentURLKey,nil];
  
  [psc addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeUrl options:options error:&amp;error]);
  </code></pre>
  
  <p>The problem is: if there's data already stored in iCloud, this method takes forever to return the persistentStoreCoordinator.  If I do it synchronously I'm watching a blank screen for a few minutes, if I do it asynchronously my app is completely unusable because I can't interact with Core Data.</p>
  
  <p>Surely there's a way I could add the persistent store as I would without iCloud, and then let iCloud work asynchronously?</p>
  
  <p>Basically, my question is, what is iCloud doing during the time it takes to initially sync and can I have my persistentStoreCoordinator first, and let the data sync in the background? </p>