New entities downloaded from iCloud (originating on another device) displayed in tableView disappear when the app is restarted. Should it be necessary for to explicitly save the managedObectContext to get the downloaded entities to persist and, if so, where should this save occur?
Asked
Active
Viewed 24 times
1 Answers
0
I found that the downloaded entities were actually being saved, as a result of mergeChanges(fromContextDidSave:) being called (on the proper thread) in the ensembles delegate method persistentStoreEnsemble(_:didSaveMergeChangesWith:), but were not showing in my tableView after app restart because of a non-nil cache name set for the fetchedResultsController (FRC) used to populate the tableView. The problem is resolved if the cache name for the FRC is set to nil.

fivewood
- 391
- 4
- 11