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

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


Solution 1:

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

Solution 2:

The simplest I've found is this one https://github.com/misato/SQLiteManager4iOS

SQLiteManager by Ester Sanchez.

Using it is basically like this:

NSArray *results = [dbManager getRowsForQuery:@"SELECT * FROM table WHERE id = 1"];

results is an array containing dictionaries. Each dictionary is a single returned row where the keys are the names of each column in the table.

After that you can do things like this:

NSDictionary *aPerson = [results objectAtIndex:0];
NSString *firstName = aPerson[@"firstName"];
NSString *email = aPerson[@"email"];