http://akabeko.me/blog/2011/11/ios-sqlite-fmdb/
基本
NSArray *paths = NSSearchPathForDirectoriesInDomains( NSDocumentDirectory, NSUserDomainMask, YES ); NSString *dir = [paths objectAtIndex:0]; FMDatabase *db = [FMDatabase databaseWithPath:[dir stringByAppendingPathComponent:@"app.db"]]; [db open]; [db close];