SQLite.swift: iOS 15.2 beta 2 (19C5036e) throws "bad parameter or other API misuse (code: 21)" when using SQLCipher Connection.key and Connection.rekey

When trying to encrypt non encrypted db or change the key on an open encrypted db with Connection.rekey or decrypt the encrypted db with Connection.key it throws “bad parameter or other API misuse (code: 21)”.

On iOS 15.1 and earlier the same code works fine. Tested on different devices.

SQLite v. 0.13.0 SQLite.swift/SQLCipher v. 0.13.0 SQLCipher 4.4.3, 4.5.0

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 15

Commits related to this issue

Most upvoted comments

@nitrag I’m not sure what the best solution here is. Perhaps SQLiteMigrationManager could have a subspec which depends on SQLite.swift/SQLCipher (open an issue/ask over there). Or you could do some trickery in pre_install, to remove the dependency there.