-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
SQLiteConnection throws error in ctor on iOS 14 #986
Comments
After investigating I've found that when this was implemented in our product the dev didn't add the sqlite-net-sqlcipher package or SQLitePCLRaw.bundle_sqlcipher which is what's referenced in the readme on the version of sqlite-net we are on (1.5.231), when they migrated the data into a DB with a key for encryption. What would this mean to the level of encryption to the database? Would it still be encrypted at all? After adding the sqlite-net-sqlcipher package I am getting an error stating |
This is the same issue in my case also. I was using Sqlite-net-pcl earlier with which i created encrypted db. Now for iOS14, i started using sqlite-net-sqlcipher and when I tried to use the previously created encrypted db using this sqlcipher, i get 'file is not a database' error. I am stuck here. |
@AdamBowler if you were previously using sqlite-net-pcl then your database may not even be encrypted even if you provided a key parameter to the constructor. You should extract a database of a device or simulator to check. If it is not encrypted you would need to perform steps to encrypt it. If it is encrypted you would need to either migrate it from SQLCipher 4 or setup backwards compatibility. |
@AdamBowler Issue #991 is reporting a similar error, but I have not been able to reproduce a difference in behavior between iOS 13 and 14 with a test application so far. If you or @xhashimks can provide a standalone project that reliably reproduces the reported issue it would be helpful. |
@AdamBowler if you were not using sql cipher then the database is not encrypted. The reported exception is troubling and I'll investigate. |
While investigating similar reports we have discovered that iOS 13 and 14 appear to have changed the behavior of the system iOS SQLite library such that using |
Wow. |
Thanks @sjlombardo and @praeclarum for your assistance, I'll inform my company. Good news is we've switched to |
@praeclarum @ericsink @sjlombardo Thank you guys for the great libraries. Unfortunately, I am having the same issue. After reading through this thread, #955, #972 and here, I am still unable to resolve my issue. I have uploaded a sample project, which demonstrate the "file is not a database" issue. Any help would be greatly appreciated. |
Hey guys, adding postKeyAction: c => c.Execute ("PRAGMA cipher_compatibility = 3") as stated here solved my issue. |
When constructing the SQLiteConnection object on a device running iOS 14 the following error is throw
Here is my code for the ctor
This only occurs on iOS 14 and not on any other version of iOS.
The text was updated successfully, but these errors were encountered: