objective-cfmdbsqlcipher

FMDB/SQLCipher and FMDBMigrationManager migration fails


I got issue of FMDB migration fails on application update.

  pod 'FMDB/SQLCipher', '~> 2.7'
  pod 'FMDBMigrationManager', '~> 1.4.x'

I'm using above pod versions. and thats working fine till now. After pod update getting error of database migrations fails.

Any help appreciated.


Solution

  • The default encryption settings between major versions of SQLCipher are not compatible out of the box (i.e. you can't open a database created with SQLCipher 3.x using SQLCipher 4.x without migrating it or manually modifying the default encryption settings). You'll need to migrate your 3.x SQLCipher database to use the 4.x encryption settings using PRAGMA cipher_migrate