DCFSQLite - 用于在移动 iOS 应用中使用 SQLite 实现便捷访问、命令执行和查询的库。
您需要导入 SQLite3 框架。框架 -> 添加现有框架 -> libsql3.dylib
# import "DCFSQLite.h"
//Init database
[DCFSQLite initDB:@"myapp.db"];
// To create, insert, update and delete
BOOL ok = [DCFSQLite execSQL:@"INSERT INTO Customer (name, email) VALUES ('Diego', '[email protected]')"];
//OR
BOOL ok = [DCFSQLite execSQL:@"INSERT INTO Customer (name, email) VALUES (?, ?)", @"Diego", @"[email protected]"];
//For get result queryes
NSArray *qryResult = [DCFSQLite getRows:@"SELECT * FROM Customer"];