sqlite3.dylib: illegal multi-threaded access to database connection

后端 未结 4 1638
[愿得一人]
[愿得一人] 2021-01-02 08:40

I have an iOS app that uses sqlite3 and I\'m facing issues with multi-threading crashing the app with the illegal multi-threaded access to database connec

4条回答
  •  醉话见心
    2021-01-02 09:22

    Use please SQLite Shared-Cache Mode https://www.sqlite.org/sharedcache.html

    sqlite3_open_v2(path.path, &db, SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE | SQLITE_OPEN_SHAREDCACHE, nil) != SQLITE_OK

    SQLITE_OPEN_SHAREDCACHE

    Reliable 100% :)

提交回复
热议问题