Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9067571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T16:58:27+00:00 2026-06-16T16:58:27+00:00

struggling with multi context core data, I would be very pleased for any help.

  • 0

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);
        }];
    }];
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T16:58:28+00:00Added an answer on June 16, 2026 at 4:58 pm

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Struggling with this a bit in SQL Server, any ideas? Given this data (ID
I am struggling to output this multi-array, I have tried looping through using a
I am struggling with this. Sorting a multi-dimensional array by value based on dates.
Struggling trying to find best way to reverse a GUID to username. Any help?
I'm new to Core Data, and am struggling with some of it conceptually (relative
I have been struggling with this for a little while. I have a multi-lingual
I am struggling with converting multi-rows values which are belong to the same user
I have an object that has a multi-part key and I am struggling to
Struggling to get any list function to work. I've been fine with _show and
Im struggling with this one. I have a list of items and on a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.