only perform version checks on debug builds. refs #269

This commit is contained in:
Mike Revoir 2016-08-19 08:53:51 -04:00
parent ce538e76bc
commit c6e8090085
3 changed files with 6 additions and 0 deletions

View File

@ -96,7 +96,9 @@ public class CoreDataDefaultStorage: Storage {
self.persistentStore = try cdInitializeStore(store, storeCoordinator: persistentStoreCoordinator, migrate: migrate)
self.rootSavingContext = cdContext(withParent: .Coordinator(self.persistentStoreCoordinator), concurrencyType: .PrivateQueueConcurrencyType, inMemory: false)
self.mainContext = cdContext(withParent: .Context(self.rootSavingContext), concurrencyType: .MainQueueConcurrencyType, inMemory: false)
#if DEBUG
versionController.check()
#endif
}

View File

@ -96,7 +96,9 @@ public class CoreDataiCloudStorage: Storage {
self.rootSavingContext = cdContext(withParent: .Coordinator(self.persistentStoreCoordinator), concurrencyType: .PrivateQueueConcurrencyType, inMemory: false)
self.mainContext = cdContext(withParent: .Context(self.rootSavingContext), concurrencyType: .MainQueueConcurrencyType, inMemory: false)
self.observeiCloudChangesInCoordinator()
#if DEBUG
versionController.check()
#endif
}

View File

@ -16,7 +16,9 @@ public class RealmDefaultStorage: Storage {
internal init(configuration: Realm.Configuration? = nil, versionController: VersionController) {
self.configuration = configuration
#if DEBUG
versionController.check()
#endif
}