sqlite3_shutdown();
sqlite3_config(SQLITE_CONFIG_SINGLETHREAD);
sqlite3_initialize();
NSString *docmentPath =
NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0];
NSString *sqlitePath = [docmentPath stringByAppendingPathComponent:@"database.sqlite"];
int result = sqlite3_open([sqlitePath UTF8String],&_db);
我尝试在iOS 12.1设备上配置单线程模式,但是sqlite3_open
返回错误代码7:SQLITE_NOMEM。
在iOS 11上运行良好。