From 35fbaf951320b44091a368e621f43787aa80d16f Mon Sep 17 00:00:00 2001 From: John Estropia Date: Thu, 9 Jul 2015 21:25:19 +0900 Subject: [PATCH] updated for Xcode 7 beta 3 --- CoreStore/Migrating/DataStack+Migration.swift | 20 +++++++++++-------- .../ObjectObserverDemoViewController.swift | 2 +- .../TransactionsDemoViewController.swift | 4 ++-- CoreStoreTests/CoreStoreTests.swift | 2 +- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/CoreStore/Migrating/DataStack+Migration.swift b/CoreStore/Migrating/DataStack+Migration.swift index ba44375..02fce91 100644 --- a/CoreStore/Migrating/DataStack+Migration.swift +++ b/CoreStore/Migrating/DataStack+Migration.swift @@ -406,10 +406,12 @@ public extension DataStack { destinationModel: destinationModel) { migrationSteps.append( - sourceModel: sourceModel, - destinationModel: destinationModel, - mappingModel: mappingModel, - migrationType: .Heavyweight + ( + sourceModel: sourceModel, + destinationModel: destinationModel, + mappingModel: mappingModel, + migrationType: .Heavyweight + ) ) } else { @@ -422,10 +424,12 @@ public extension DataStack { ) migrationSteps.append( - sourceModel: sourceModel, - destinationModel: destinationModel, - mappingModel: mappingModel, - migrationType: .Lightweight + ( + sourceModel: sourceModel, + destinationModel: destinationModel, + mappingModel: mappingModel, + migrationType: .Lightweight + ) ) } catch { diff --git a/CoreStoreDemo/CoreStoreDemo/List and Object Observers Demo/ObjectObserverDemoViewController.swift b/CoreStoreDemo/CoreStoreDemo/List and Object Observers Demo/ObjectObserverDemoViewController.swift index ad7c5b0..2942f00 100644 --- a/CoreStoreDemo/CoreStoreDemo/List and Object Observers Demo/ObjectObserverDemoViewController.swift +++ b/CoreStoreDemo/CoreStoreDemo/List and Object Observers Demo/ObjectObserverDemoViewController.swift @@ -43,7 +43,7 @@ class ObjectObserverDemoViewController: UIViewController, ObjectObserver { // MARK: UIViewController - required init(coder aDecoder: NSCoder) { + required init?(coder aDecoder: NSCoder) { if let palette = CoreStore.fetchOne(From(Palette), OrderBy(.Ascending("hue"))) { diff --git a/CoreStoreDemo/CoreStoreDemo/Transactions Demo/TransactionsDemoViewController.swift b/CoreStoreDemo/CoreStoreDemo/Transactions Demo/TransactionsDemoViewController.swift index c5c7bf7..57e4225 100644 --- a/CoreStoreDemo/CoreStoreDemo/Transactions Demo/TransactionsDemoViewController.swift +++ b/CoreStoreDemo/CoreStoreDemo/Transactions Demo/TransactionsDemoViewController.swift @@ -193,11 +193,11 @@ class TransactionsDemoViewController: UIViewController, MKMapViewDelegate, Objec CLLocation(latitude: place.latitude, longitude: place.longitude), completionHandler: { [weak self] (placemarks, error) -> Void in - if let placemark = placemarks?.first { + if let placemark = placemarks?.first, let addressDictionary = placemark.addressDictionary { let place = transaction.edit(Static.placeController.object) place?.title = placemark.name - place?.subtitle = ABCreateStringWithAddressDictionary(placemark.addressDictionary, true) + place?.subtitle = ABCreateStringWithAddressDictionary(addressDictionary, true) transaction.commit { (_) -> Void in } } diff --git a/CoreStoreTests/CoreStoreTests.swift b/CoreStoreTests/CoreStoreTests.swift index 20182a3..676c96d 100644 --- a/CoreStoreTests/CoreStoreTests.swift +++ b/CoreStoreTests/CoreStoreTests.swift @@ -43,7 +43,7 @@ class CoreStoreTests: XCTestCase { func testExample() { - let stack = DataStack(modelName: "Model", sourceBundle: NSBundle(forClass: self.dynamicType)) + let stack = DataStack(modelName: "Model", bundle: NSBundle(forClass: self.dynamicType)) CoreStore.defaultStack = stack XCTAssert(CoreStore.defaultStack === stack, "CoreStore.defaultStack === stack")