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 7815907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:40:34+00:00 2026-06-02T05:40:34+00:00

I’m working on a sync process where the latest changed objects are loaded from

  • 0

I’m working on a sync process where the latest changed objects are loaded from a server with RestKit using a timestamp and saving all changes using Core Data based on the MOC idea.

Sequence
1) Starting the sync process and save changes to Core Data [AppDelegate]
2) Refetching data from Core Data after process is finished and reload data [ContactTableView]
3) Reloading input views when fetch is complete [ContactDetailView]
4) Reloading table view placed in ViewContainer inside of ContactDetailView [ContactDetailTV]

Passing data between views

ContactTableView (passing object when user selects row)
--» ContactDetailView (passing object to subView in viewContainer)
    --» ContactDetailTV (displaying data of object in a tableView) 

Problem
That works
When I’m inside of ContactTableView the table view is reloaded with the new fetched data and everything is fine.

That doesn’t work
When I’m inside of ContactDetailTV (because the data can change when I’m looking at it) the view displays the old data inside of the ContactDetailTV even after calling [self.tableView reloadData].

Question
What am I doing wrong or what is missing to get the reloading to work like expected?


Code

AppDelegate

- (void)startSyncProcess:(NSInteger)operationCode
{        
// Init helper
syncCount = 0;
syncProcess = 0;

switch (operationCode) 
{
    default:
        // (1) Request deleted companys from server
        [self requestDeletedCompanysFromServer];
        break;

    case 0:
        // (2) Request deleted contacts from server
        [self requestDeletedContactsFromServer];
        break;

    case 1:
        // (2) Request edited companys from server
        [self requestEditedCompanysFromServer];
        break;

    case 2:
        // (2) Request edited contacts from server
        [self requestEditedContactsFromServer];
        break;

    case 3:
        // Reload data views
        [self saveCurrentSyncTime];            

        [[NSNotificationCenter defaultCenter] postNotificationName:@"updateTableViewAfterSave" object:self];
        break;
}
}

ContactTableView

- (void)syncContextDidSave:(NSNotification*)saveNotification 
{   
   // Handling the "updateTableViewAfterSave"-notification by refetching the data with Core Data
    NSError *error;
    if (![[self fetchedResultsController] performFetch:&error]) 
         NSLog(@"[ERROR] Saving failed with error: %@", [error userInfo]);

    [[NSNotificationCenter defaultCenter] postNotificationName:@"updateSubViewAfterSave" object:nil];
}

ContactDetailTV

- (void)updateSubViewAfterSave:(NSNotification *)saveNotification
{
    // Handling the "updateSubViewAfterSave"-notification by updating the table view that displays the data without using a fetchedResultsController
    [self.tableView reloadData];
}
  • 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-02T05:40:35+00:00Added an answer on June 2, 2026 at 5:40 am

    To update the object with the newest data from Core Data (because even when refetching the data, the context of the fetchedController keeps a “snapshot” of the object), I had to update the method.

    - (void)updateSubViewAfterSave:(NSNotification *)saveNotification
    {
        // Handling the "updateSubViewAfterSave"-notification by updating the table view that displays the data without using a fetchedResultsController
    
        id appDelegate = (id)[[UIApplication sharedApplication] delegate]; 
        NSManagedObjectContext *tempContext = [appDelegate managedObjectContext];
    
        [tempContext refreshObject:contact mergeChanges:YES];
        [self.tableView reloadData];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a text area in my form which accepts all possible characters from
I have thousands of HTML files to process using Groovy/Java and I need to
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I am reading a book about Javascript and jQuery and using one of the
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build

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.