We are looking to develop an application that will get data from a web service if there is internet connectivity, and store this data using Core Data to Sqlite database just for viewing only (no updates will take place to local data), and whenever there is internet connectivity the app (or possibly a background thread) keeps checking the web service for new data.
- How to know that the data which returned by the web service contains new records, and that the app should only store the new data, not the whole dataset again?
- Is there a tutorial available on the web for a similar scenario?
My solution is to have an ‘added’ field in the database (Both local and remote) then when the service is called,the phone passes the most recent updated date/time in the local DB as a parameter…so the service only returns new data