I have a bit of a design question if anyone at there cares to offer some advice (or point me in the right direction).
I am writing an IPad app that will be gathering data from a server and then will be using that data for some time (read: it would be nice to be able to store the data locally even when the app is not running). Anyone know of the best way to accomplish a feat like this.
Essentially, order of events would preferbly go something likes this:
- User launches app.
- IPad requests data from server.
- Server supplies data.
- User interacts with app etc.
- User closes app.
- At a later time, user launches app again.
- App checks data, sees it is still up to date开发者_JAVA百科, reads in previous data from disk.
- User interacts with data etc.
Thanks in advance.
When the application is launching for the first time you should get all the data and store in to a local database.
When the user open the application after some other time just write make a webservice call that check for the last updated time, if it matches your time then leave it,else update the database.
精彩评论