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

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


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


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"];


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.