Q:

how to refresh my fetchedresultcontroller after change from other contexts

struggling with multi context core data, I would be very pleased for any help.
After the sync operations finished this block is called:
[[SyncEngine sharedEngine]setFinishedSyncCompletionBlock:^{
        //---setting FRC to nil did refresh tableview but it is kinda slow
       //  self.fetchedResultsController=nil;
        [self loadRecordsFromCoreData];
        [self.tableView reloadData];

    }];

And here I can see new managedobjects are in context. But calling [self.tableView reloadData]; after this not refreshes my tableview, or  (void)controllerDidChangeContent:(NSFetchedResultsController *)controller  not fires.
- (void)loadRecordsFromCoreData {
    NSLog(@"here loadRecordsFromCoreData");
    [self.managedObjectContext.parentContext performBlock:^{
       //---this is also a trial for resetting FRC
       // [self.managedObjectContext reset];
        NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] initWithEntityName:@"Event"];

        // Edit the sort key as appropriate.
        fetchRequest.sortDescriptors = @[ [[NSSortDescriptor alloc] initWithKey:@"timeStamp" ascending:NO] ];

        NSArray *objects = [self.managedObjectContext.parentContext executeFetchRequest:fetchRequest error:NULL];
        NSArray *objectIDs = [objects valueForKey:@"objectID"];

        [self.managedObjectContext performBlock:^{

            NSArray *objects = [self.managedObjectContext objectsWithIDs:objectIDs];
          //  self.fetchedResultsController.managedObjectContext = self.managedObjectContext;
            NSLog(@"objects: %lu", (unsigned long)objects.count);
        }];
    }];

A:

This is happening because reload table method is being called before loadRecordsFromCoreData's blocks are executed. Just make few changes, call [self.tableView reloadData]; after NSLog(@"objects: %lu", (unsigned long)objects.count); in  self.managedObjectContext performBlock block.

