user310000
user310000

Reputation: 105

on-the-device database for my iphone app

I want to have on-the-device database for my iphone app. It concerns with the data, which comes from dictionary consisting of 200.000 things and their definitions. It is only related with text-type data as appeared. My questions:

1- Does SQLite hold all of these data?

2- When the client downloaded my app, he/she will also have the db in his/her device. Does app store allow me to update my app's db and upload my new release? (i don't know these issues well by the way)

3- And can any client, who downloaded my app, hack and obtain my database? Is there any prevention methods? Is SQLite resilient enough against these?

Upvotes: 0

Views: 285

Answers (2)

Vin
Vin

Reputation: 10548

1) sqllite can definitely hold that amount of data.

2) You can put up an option of refreshing the database in your app. That can be used to sync the local db with the server copy. Updated db can also be added with the new version of the app.

3) You can encrypt your local db using SQLCipher for protecting your application db against hacks.

Upvotes: 1

John Parker
John Parker

Reputation: 54415

1- Does SQLite hold all of these data?

Yes, SQLite can cope with this amount of data.

2- When the client downloaded my app, he/she will also have the db in his/her device. Does app store allow me to update my app's db and upload my new release? (i don't know these issues well by the way)

The general approach is to store the SQLite database in your application bundle and then copy the database into the application's document directory on the device when the application is first run. On subsequent updates to your applciation, you should check if the database within the document directory is the same version and update it if necessary. See the existing Run NSBundle from the documents folder question/answer for more information on this.

3- And can any client, who downloaded my app, hack and obtain my database? Is there any prevention methods? Is SQLite resilient enough against these?

It's fairly trivial to open up an app (the deployment package is just a zip file after all), so yes, it will be possible to obtain access to your database data. Unfortunately there's no easy way around this that I'm aware of. (You could I suppose download the data from a server when you first run you app, but it'll still be accessible on a jailbroken device.)

Sometimes, you just have to bite the bullet and accept the fact that your data is going to be ripped off.

Upvotes: 2

Related Questions