project-imas / encrypted-core-data

v2.0 - iOS Core Data encrypted SQLite store using SQLCipher
Other
785 stars 236 forks source link

Fe core data encrypt #297

Closed joshxplor closed 6 years ago

joshxplor commented 6 years ago

What/Why?

Issue with Light migration for CoreData which causes the application to crash when there are changes to the schema of the DB

Solution

Instead of manually migrating CoreData schema changes, we let CoreData handle the migration process.

How was it tested?

Steps in testing

Assuming you already have an application running with a populated DB store

  1. Create a new version of xcdatamodel
  2. Update any entity by adding a new property to the new version of xcdatamodel
  3. Select the new xcdatamodel version from the utility panel of Xcode
  4. Run the app to build with the new DB schema
  5. App should not crash
  6. Extract SQLiteDB from the app and check if the new property exist in the schema.