title: NSFetchedResultsController does not update TableView after UIManagedDocuments gets new data
body: <p>I am using a <code>NSFetchedResultsController</code> in combination with a <code>UIManagedDocument</code> which gets updated in an background thread.</p>
  
  <p>I have set up the NSFetchedResultsController exactly as described in this tutorial: <a href="http://www.raywenderlich.com/999/core-data-tutorial-how-to-use-nsfetchedresultscontroller" rel="nofollow">How To Use NSFetchedResultsController</a> </p>
  
  <p>I have set the delegate <code>_fetchedResultsController.delegate = self</code> and the protocol for my view controller to <code>NSFetchedResultsControllerDelegate</code>.</p>
  
  <p>My code works fine when it loads the data after launch. However, the <code>NSFetchedResultsController</code> <strong>does not update the TableView</strong> whenever it has processed and saved the data in the background thread. In particular, the NSFetchedResultsController's delegate methods <code>-controllerWillChangeContent:controller</code>etc. are never being called.</p>
  
  <p>I have double-checked that the SQLite database contains the data correctly.
  This is how I process and save the data in the view controller:   </p>
  
  <pre><code>[backgroundContext performBlock:^{
          [company parseAttributesFrom:xmlStr inManagedObjectContext:backgroundContext]; //self.managedDocument.managedObjectContext
  
          NSError *error = nil;
          [backgroundContext save:&amp;error];
           if (error) NSLog(@"error: %@",error.localizedDescription);
          [self.managedDocument.managedObjectContext performBlock:^{
              NSError *error = nil;
              [self.managedDocument.managedObjectContext save:&amp;error];
              if (error) NSLog(@"error: %@",error.localizedDescription);
          }];
          [self.managedDocument saveToURL:self.managedDocument.fileURL forSaveOperation:UIDocumentSaveForOverwriting completionHandler:NULL];
          [self.managedDocument updateChangeCount:UIDocumentChangeDone];
      }];
  </code></pre>
  
  <p>How can I get the NSFetchedResultsController to update the TableView automatically when the underlying data changes? </p>
  
  <p>Thank you for your help!</p>