thedom
thedom

Reputation: 2518

Update iOS database via file or via json?

I'm currently updating an app which I developed quite a long time ago. I'm wondering what's the best way to update the sqlite database via REST api.

I'm thinking about the following process:

Now I'm thinking what's the better way to "send" the data to the client. Download a sqlite? Or create a JSON at the webservice (what means somehow overhead). The sqlite is currently about 100 kb.

Anyone an idea?

Upvotes: 0

Views: 155

Answers (1)

Toastor
Toastor

Reputation: 8990

If

  • there is no user data to preserve and there won't be any in the future, e.g. if your database is completely static
  • it is safe to assume its size is not going to increase significantly
  • your database model hasn't changed and is highly unlikely to change in the future
  • you're 86% sure that you'll never again be requiring a proper api to a similar online database, featuring delta updates and a generic format like json

go ahead and transmit that replacement sqlite. Otherwise, do it properly!

Upvotes: 1

Related Questions