I am using SQLite.swift library in my project: https://github.com/stephencelis/SQLite.swift
I do file copy of an originally created SQLite database from assets catalog to the documents directory and then I perform an insert statement. Everything OK until now.
For some condition in the app I do a kind of "reset", that is a replace of the created database in documents directory with the original in assets folder. Deleting and copying is done OK but after trying to perform an insert query on the new database I am getting an SQLite disk I/O error (code: 10).