Best Cocoa/Objective-C Wrapper Library for SQLite on iPhone

Viewed 38271

I'm developing for the iPhone and am looking for a good Cocoa/Objective-C library for working with SQLite. I don't want to use the standard procedural SQLite C API. I see options at sqlite.org under the Objective-C section, but am not sure which is the best in terms of library API design, stability, and functionality. I'd like to use something that's actively being developed and hopefully will be around for a while. Anyone have suggestions based on experience using one?

Thanks

7 Answers

I personally use FMDB, and the last update to it was yesterday.

I'm also a fan of FMDatabase, although I've had to customize my own version of it. My apps use a layer around it I wrote called ArchDBObject that transparently converts objects to and from a database representation; I'm thinking about releasing it in some form, but I haven't really decided how yet.

In any case, FMDatabase can be had at https://github.com/ccgus/fmdb.

FMDB is nice because it's the lightest way to not have to deal with the C calls and type conversions, while still giving you full access to the SQL.

The thing I generally do not like about object-relational wrappers is that you get too distant from the SQL being generated and that's when performance can start to suffer.

I have a simple ORM on top of FDBM here http://code.google.com/p/chibiorm/.

With it, you can use raw SQL when you wish, return any SQL as a dict list, or use the nice OO style.

Related