Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best practice? iphone: sync data [closed]

I'm working on a project where there is data visualization.

My ultimate goal is that I have a set of data shipped with the download of the iphone app. But I want it connected to a backend, that if the iphone has a connection with the internet. it can sync the changes from the backend.

The syncing is no problem or the connection between the backend & the iphone.

But what should I use as data storage on my iphone? What is the best way? My data is purely text and doesn't have to be secure.

But it's main feature should be updating certain parts of data (adding and deleting are not so important).

So what is the easiest (read: least time consuming development) or the best way?

  • sqlite?
  • plist?
  • ..?
like image 722
Andy Jacobs Avatar asked May 11 '09 07:05

Andy Jacobs


1 Answers

Best results will probably be achieved with SQLite. You can store the initial database in the app itself and copy to the Documents folder. Request deltas from the server at startup to keep the database in sync. For one-way sync, storing a version field and then asking the server for the SQL statements to execute for that version should be sufficient; for two-way sync, something more complicated will probably be necessary.

like image 98
rpetrich Avatar answered Oct 17 '22 00:10

rpetrich