Watch + SQLite

Hi, I am building an app that has about 8,000 rows of data (file size is around 1MB). At the moment I am storing this all in a plist, but I read that I should keep plists below 200Kb. I also need to read and write this data, so it would be handy to use database functionality rather than serialising 8,000 rows for each operation.


So does SQLite exist on the Apple Watch? How can I create an SQLite database-based app in Xcode? Thanks.

That's a good point, especially with updates to my default data which I anticipate will be happening. I have decided to keep my static data and user data separate.


And to combat my inability to do a join on tables from separate databases, I've just written more routines that achieve what the join would've done but in a more verbose way. I guess that is the best trade-off.

You can join across databases in SQLite. You just need to use the "attach" statement. See sqlite.org/lang_attach.html

Hi dshum17,
I'm also looking for the same. Can you help me in this ?
I want to add a pre populated database with watch app.
I want to add user scores for a game.
I want to know 2 things -
1. How did you copied database to writebale location.
2. Can you share the functions/classes you write for INSERT/UPDATE/FETCH operations over the database ?

Watch + SQLite
 
 
Q