updated for Xcode 7 beta 3

This commit is contained in:
John Estropia
2015-07-09 21:25:19 +09:00
parent 450afb00fa
commit 35fbaf9513
4 changed files with 16 additions and 12 deletions

View File

@@ -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 {

View File

@@ -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"))) {

View File

@@ -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 }
}

View File

@@ -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")