Ecrypt existing database => IOS #3501
-
Hello Simon, Do you have any idea to resolve it ? NB : I replaced confidential information with xxx pubspec.yaml :
My utils class to generate my database (I have 3 in total in my applications):
Flutter :
Best, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, thanks for the report! I'm also not sure what's going on here, the setup looks good to me. Can you try running the if (await existing.exists() && !await encrypted.exists()) {
final plaintextDb = sqlite3.open(decryptedPath);
assert(rawDb.select('PRAGMA cipher_version;').isNotEmpty);
plaintextDb
..execute("ATTACH DATABASE '${escapeString(encryptedPath)}' "
// ... If that's missing, a common problem may be that one of the other dependencies is linking the regular sqlite3 library from the system in some way (I know firebase might to do this). Does adding this to the podfile help? |
Beta Was this translation helpful? Give feedback.
Hi, thanks for the report! I'm also not sure what's going on here, the setup looks good to me. Can you try running the
cipher_version
pragma incheckAndEncryptFile
too? Basically, I'm trying to find out whether SQLCipher was linked at all.If that's missing, a common problem may be that one of the other dependencies is linking the regular sqlite3 library from the system in some way (I know fireb…