I’m encountering an issue with SQLCipher in my iOS app after updating to a new version, which involves different workspaces of my app. The app uses SQLCipher to manage an encrypted SQLite database.The previous version (workspace2) had SQLCipher code that worked correctly. However, after updating to the new version (workspace1), I’m now receiving the error “file is not a database” when trying to access the database file.
Workspace Dependencies:
Previous Version:
- Workspace1: There is no db related code here
- Workspace2: Contains SQLCipher integration code and database operations.
- App: Dependent on Workspace1 & 2 which includes additional app
logic and functionality.
New Version:
-
Workspace1: Contains SQLCipher integration code and database operations.
-
Workspace2: Depending on workspace1 and using few db operations.
-
App: Dependent on Workspace1 & 2 which includes additional app
logic and functionality.
Steps Taken:
Checked Database Path:
-
Confirmed that the database file exists at the specified path in the
Documents directory. -
Ensured that the path is correct and the file is not missing.
Encryption Key:
-
Verified that the correct encryption key is used to open the
database. -
The encryption key hasn’t changed between app versions.
Database File Integrity:
-
Considered the possibility of database file corruption after the
update. -
Not sure how to verify or fix any potential corruption.