I have an app that uses an SQLite database to store some information.
In the first installation of the app I create the database and pass a script to include the necessary data in it. Among these data I have a master of administrative regions of Spain, which implies a slow initialization process. What are the best practices to carry out this initial load?
I've tried throwing it in a background thread, but if I do, I get an EXC_BAD_ACCESS error.
-
—
endecotp
-
—
diegocidm4
-
—
endecotp
Add a CommentWhy can't you ship a pre-populated sqlite file?
It could be an option. I did not know that an sqlite file could be sent. How could it be done?
If you have the data in e.g. a CSV file, load that into sqlite using the sqlite command-line program. Add that file to your app.
An important question is whether the database is read-only or read-write by the app.