I'm generating a pretty big sqlite-file on a server (about30'000 entries, it's about 3mb big) and would like to use that data in my iPhone application.
The sqlite-file on the server is generated every hour; some of the data is changing nearly everytime, some of the data changes only rarely.
Is there a way only to send the changed data to the iPhone as I do not want to let the user load 3mb every time he uses the appl开发者_JAVA技巧ication.
What can I do to only send the data to the client that changed since the last time he asked for it? Any ideas?
Keep a timestamp for each iPhone that requests the data, and then use that to determine which rows have changed since the last time the iPhone asked.
Alternatively, the iPhone can send a timestamp of when it last asked for the data the next time it asks.
You will also need to store a last updated timestamp for each row in the database, so you can determine which ones have changed since the iPhone last asked.
精彩评论