SQLite wrappers on iPhone

On a recent project that needed to keep data in sqlite, I experimented with an implementation of ActiveRecord and also sqlitepersistentobjects. I had passed up a few others that were too complicated or licensed under something like the GPL that prevented commercial work.

While the ActiveRecord author has to get an award for the quickest replies to email, sqlitepersistentobjects was easiest to get working. You don’t even “set up” a database for this wrapper. When you save an object an sqlite database “somewhere” is updated with the right tables. This presumably also handles updates to the metadata but I didn’t play with that.

With iPhone OS 3.0 coming up in a few months and including CoreData, this becomes a question of what to use for legacy devices or projects released before summer. CoreData is going to become the standard way to persist data locally.