So I added some new properties to some of my models, and in the simulator, simply calling this works:
setSchemaVersion(7, realmPath: Realm.defaultPath) { migration, oldSchemaVersion in
if oldSchemaVersion < 7 {
migration.enumerate(ExerciseType.className(), { (oldObject, newObject) -> Void in
newObject!["weighted"] = true
})
}
}
But when I try to run this on the device, it just hangs. I tried commenting out the new migration, and I correctly get the error message that a migration needs to take place (my previous schema version was 6), but when I add the new migration back in, my app just hangs and never actually calls the migration block.
Any ideas what this could be? Is there a way to recover from this without resetting my Realm entirely?