I am running an update thread which updates a table using coredata.
One of the records is called last-update. But when after the update is finished I retrieve the last-update value in the main thread I get an outdated value.
I do:
[NSFetchedResultsController deleteCacheWithName:nil];
before query-ing the setting again, but is there anything else I should/can do to alert the mainthread that it should check the physical table again?
It sounds like you’re not syncing the updates back into the main thread’s NSManagedObjectController. Try adding a method like this:
Then hook that up to the
NSManagedObjectContextDidSaveNotification: