WIP: pretty logging

This commit is contained in:
John Rommel Estropia
2016-05-06 09:19:24 +08:00
parent 0073d038e0
commit 4eecd80710
6 changed files with 495 additions and 145 deletions

View File

@@ -7,6 +7,7 @@
//
import UIKit
import CoreData
import CoreStore
@@ -24,10 +25,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
application.statusBarStyle = .LightContent
print(InMemoryStore())
print(SQLiteStore())
print(LocalStorageOptions.None)
print([.AllowSynchronousLightweightMigration, .PreventProgressiveMigration] as LocalStorageOptions)
print(CoreStoreError.MappingModelNotFound(localStoreURL: NSURL(string: "file://sample.db")!, targetModel: NSManagedObjectModel.mergedModelFromBundles(nil)!, targetModelVersion: "Sample-1.0.0"))
CoreStore.defaultStack = DataStack(migrationChain: ["Sample-1.0.0": "Sample-1.0.2", "Sample-1.0.1": "Sample-1.0.2"])
print(CoreStore.defaultStack)
print(CoreStore.beginUnsafe())
return true
}

View File

@@ -157,7 +157,7 @@ class MigrationsDemoViewController: UIViewController {
)
self.setEnabled(false)
let progress = try! dataStack.addStorage(
let progress = dataStack.addStorage(
SQLiteStore(fileName: "MigrationDemo.sqlite"),
completion: { [weak self] (result) -> Void in