mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-04-27 11:17:05 +02:00
updated for Xcode 7 beta 3
This commit is contained in:
@@ -406,10 +406,12 @@ public extension DataStack {
|
|||||||
destinationModel: destinationModel) {
|
destinationModel: destinationModel) {
|
||||||
|
|
||||||
migrationSteps.append(
|
migrationSteps.append(
|
||||||
sourceModel: sourceModel,
|
(
|
||||||
destinationModel: destinationModel,
|
sourceModel: sourceModel,
|
||||||
mappingModel: mappingModel,
|
destinationModel: destinationModel,
|
||||||
migrationType: .Heavyweight
|
mappingModel: mappingModel,
|
||||||
|
migrationType: .Heavyweight
|
||||||
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -422,10 +424,12 @@ public extension DataStack {
|
|||||||
)
|
)
|
||||||
|
|
||||||
migrationSteps.append(
|
migrationSteps.append(
|
||||||
sourceModel: sourceModel,
|
(
|
||||||
destinationModel: destinationModel,
|
sourceModel: sourceModel,
|
||||||
mappingModel: mappingModel,
|
destinationModel: destinationModel,
|
||||||
migrationType: .Lightweight
|
mappingModel: mappingModel,
|
||||||
|
migrationType: .Lightweight
|
||||||
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class ObjectObserverDemoViewController: UIViewController, ObjectObserver {
|
|||||||
|
|
||||||
// MARK: UIViewController
|
// MARK: UIViewController
|
||||||
|
|
||||||
required init(coder aDecoder: NSCoder) {
|
required init?(coder aDecoder: NSCoder) {
|
||||||
|
|
||||||
if let palette = CoreStore.fetchOne(From(Palette), OrderBy(.Ascending("hue"))) {
|
if let palette = CoreStore.fetchOne(From(Palette), OrderBy(.Ascending("hue"))) {
|
||||||
|
|
||||||
|
|||||||
@@ -193,11 +193,11 @@ class TransactionsDemoViewController: UIViewController, MKMapViewDelegate, Objec
|
|||||||
CLLocation(latitude: place.latitude, longitude: place.longitude),
|
CLLocation(latitude: place.latitude, longitude: place.longitude),
|
||||||
completionHandler: { [weak self] (placemarks, error) -> Void in
|
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)
|
let place = transaction.edit(Static.placeController.object)
|
||||||
place?.title = placemark.name
|
place?.title = placemark.name
|
||||||
place?.subtitle = ABCreateStringWithAddressDictionary(placemark.addressDictionary, true)
|
place?.subtitle = ABCreateStringWithAddressDictionary(addressDictionary, true)
|
||||||
transaction.commit { (_) -> Void in }
|
transaction.commit { (_) -> Void in }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class CoreStoreTests: XCTestCase {
|
|||||||
|
|
||||||
func testExample() {
|
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
|
CoreStore.defaultStack = stack
|
||||||
XCTAssert(CoreStore.defaultStack === stack, "CoreStore.defaultStack === stack")
|
XCTAssert(CoreStore.defaultStack === stack, "CoreStore.defaultStack === stack")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user