fix RecreateStoreOnModelMismatch option not working when an existing xcdatamodel gets updated without adding a new version

This commit is contained in:
John Rommel Estropia
2016-09-10 22:51:33 +09:00
parent 4a34012d58
commit f99d3cc21a
9 changed files with 36 additions and 12 deletions

View File

@@ -263,7 +263,7 @@ public final class DataStack {
URL: fileURL,
options: storeOptions
)
try _ = self.model[metadata].flatMap(storage.eraseStorageAndWait)
_ = try storage.eraseStorageAndWait(soureModel: self.model[metadata])
try self.createPersistentStoreFromStorage(
storage,
@@ -359,7 +359,7 @@ public final class DataStack {
URL: cacheFileURL,
options: storeOptions
)
try _ = self.model[metadata].flatMap(storage.eraseStorageAndWait)
_ = try storage.eraseStorageAndWait(soureModel: self.model[metadata])
try self.createPersistentStoreFromStorage(
storage,