[Error: file is not a database] on iOS 17

That error indicates that you are attempting to do one of the following:

  1. open an encrypted database without a key;
  2. open an encrypted database but the key material is incorrect;
  3. provide a key to open a non-encrypted database (note that “keying” an unencrypted database does not encrypt it, see How to encrypt a plaintext SQLite database to use SQLCipher (and avoid “file is encrypted or is not a database” errors)); or
  4. open a database using a mismatched major version of SQLCipher (e.g. a 3.x database with 4.x or vise versa see Upgrading to SQLCipher 4)