Posts tagged SQLite
Using SQLite databases in iOS apps
0Recently I’ve been working on an application that has to store a significant amount of data on a device. When storing data on the iPhone there are a few options. You can use straight up text or xml files that are then read when the app runs, you can use the Core Data framework that comes with iOS, or you can use an SQLite database that is then deployed with the app.
My choice was very straightforward since we needed to store relatively complex data and would like the possibility of building a similar app for other platforms (Android and Windows Phone 7 also support SQLite databases).
Creating the Database
There are all kinds of tools with which to create your SQLite database, and you will easily find a handful through a Google search. We will stick with the command line SQLite3 utility that comes with your Mac. To start building your database, open a terminal window and start the sqlite3 utility. Pass it one argument – the name of the database file you want to create or edit. The ‘Terminal’ application can be found in your ‘Applications/Utilities’ folder.
Recent Comments