In my project, I need to cache iOS device data received from a remote web service. The idea is that the view controller will request a cache for all document objects that it has, for example, and in the background will request an update from the web service, returning to the view controller any new document objects that it received. I am wondering if view controllers can use the NSFetchedResultsController, which retrieves all objects that meet the criteria that it can find locally in the database, and also asynchronously requests data to be updated from the web service in the background. At the same time, NSFetchedResultsController will update the database and, of course, run the didChangeObject method of the FetchedResultsController delegate so that the views can be updated accordingly.Does that sound reasonable? Do you have any suggestions for implementing such a thing?
source
share