U
U
uzolenta2018-12-02 22:48:19
SQLite
uzolenta, 2018-12-02 22:48:19

Insert, delete sqlite not working on device?

Hello, I'm asking for help.
On the simulator insert, delete queries work, on the phone they don't.
I connect to the database like this:

let path = Bundle.main.path(forResource: "base.sqlite", ofType: nil)!
        let baseFile = URL(fileURLWithPath: path)
        var db: OpaquePointer?
        if sqlite3_open(baseFile.path, &db) != SQLITE_OK {
            print("error opening database")
        }

The database was added in this way https://stackoverflow.com/questions/46231153/how-t...
It seems that the ability to change the database file is blocked on the device (phone), it reads normally from the database (select).
Tell me, please, what could be the problem.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question