-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS 15.2 beta 2 (19C5036e) throws "bad parameter or other API misuse (code: 21)" when using SQLCipher Connection.key and Connection.rekey #1097
Comments
Hey, we have same problem sqlcipher/sqlcipher#412 |
Strange, that's an error from SQLite. Do you know if it works without |
I did not check if it works without |
I am having this issue as well. SQLCipher - 4.4.3 How much time do we have to patch this before 15.2 release? |
As commented on sqlcipher/sqlcipher#412, it looks like there's a conflict between the bundled version of SQLite and SQLCipher. |
Tested vanilla SQLCipher v. 4.5.0 with |
@claustrofob can you post your Podfile? |
but I've got my mistake. It must be just subspec:
Now it works. The docs are a bit misleading for me here. |
Clarify SQLCipher integration (#1097)
I'm sorry but it's still not working for me even after the subspec:
|
Ok it appears that I have resolved it. SQLiteMigrationManager depends upon non-cipher so I had to fork the repo and change the Podspec dependency. Is this resolvable automatically with CocoaPods somehow? Should I open an Issue on SQLiteMigrationManager repo?
|
@nitrag I'm not sure what the best solution here is. Perhaps |
Seems like there is an incompatibility between The db encrypted with some key when both specs enabled:
cannot be decrypted with the same key when only subspec is enabled:
This is a serious problem:
Is there any workaround for this? |
@claustrofob please see #1098. Maybe the db wasn't encrypted correctly, the documentation is misleading.
You're using an unsupported configuration (2 specs enabled), don't blame the library for not functioning. |
@jberkel sure i dont blame the library, that was my mistake. But i guess it might affect other users of the library. So i need to recover from this state somehow. i would appreciate any idea. |
Sorry, this is not directly related to SQLite.swift, and it sounds like you might have misused SQLite.swift and/or SQLCipher. Closing this. |
When trying to encrypt non encrypted db or change the key on an open encrypted db with
Connection.rekey
or decrypt the encrypted db withConnection.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
The text was updated successfully, but these errors were encountered: