Reputation: 8099
I have an app, which requires a data base of about 400.000 data entries, which change from time to time (like once per month). The total size of these data is about 20MB. We want to enable the user to:
What is best practice to handle these requirements on iOS?
Upvotes: 1
Views: 1468
Reputation: 8012
You should ship a copy of your database with the app. You really don't want every user to have to wait for a 20MB download to complete before they can use your app.
As for the infrequent updates, provide an API endpoint that your app can call with a date parameter and return all new/updated records since the provided date. Also provide an endpoint that returns the date of the last change to the master database. You can then use this date to check the validity of the data on the device (assuming the device data is readonly).
The main storage options for iOS are SQLite or Core Data. As for frameworks that will take care of the synchronisation for you, TICoreDataSync is an option if you opt for Core Data on the device.
Upvotes: 3