From 88cac73b2071e9ccd49f15d0fdf2f867f020b748 Mon Sep 17 00:00:00 2001 From: John Rommel Estropia Date: Fri, 1 Apr 2016 07:41:23 +0900 Subject: [PATCH 1/2] fix assertion error --- CoreStore/Internal/NotificationObserver.swift | 4 ++-- CoreStore/Observing/ListMonitor.swift | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CoreStore/Internal/NotificationObserver.swift b/CoreStore/Internal/NotificationObserver.swift index 33c414a..b1ca9c1 100644 --- a/CoreStore/Internal/NotificationObserver.swift +++ b/CoreStore/Internal/NotificationObserver.swift @@ -36,14 +36,14 @@ internal final class NotificationObserver { let object: AnyObject? let observer: NSObjectProtocol - init(notificationName: String, object: AnyObject?, closure: (note: NSNotification) -> Void) { + init(notificationName: String, object: AnyObject?, queue: NSOperationQueue? = nil, closure: (note: NSNotification) -> Void) { self.notificationName = notificationName self.object = object self.observer = NSNotificationCenter.defaultCenter().addObserverForName( notificationName, object: object, - queue: nil, + queue: queue, usingBlock: closure ) } diff --git a/CoreStore/Observing/ListMonitor.swift b/CoreStore/Observing/ListMonitor.swift index 2c6b748..2c020fc 100644 --- a/CoreStore/Observing/ListMonitor.swift +++ b/CoreStore/Observing/ListMonitor.swift @@ -1033,6 +1033,7 @@ public final class ListMonitor { self.observerForWillChangePersistentStore = NotificationObserver( notificationName: NSPersistentStoreCoordinatorStoresWillChangeNotification, object: coordinator, + queue: NSOperationQueue.mainQueue(), closure: { [weak self] (note) -> Void in guard let `self` = self else { @@ -1054,6 +1055,7 @@ public final class ListMonitor { self.observerForDidChangePersistentStore = NotificationObserver( notificationName: NSPersistentStoreCoordinatorStoresDidChangeNotification, object: coordinator, + queue: NSOperationQueue.mainQueue(), closure: { [weak self] (note) -> Void in guard let `self` = self else { From dff552b95f73b10b8b203f594adfd9e3f5f03a13 Mon Sep 17 00:00:00 2001 From: John Rommel Estropia Date: Fri, 1 Apr 2016 07:42:00 +0900 Subject: [PATCH 2/2] version bump --- CoreStore.podspec | 2 +- CoreStore/Info.plist | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CoreStore.podspec b/CoreStore.podspec index 287cfb4..73ff5b3 100644 --- a/CoreStore.podspec +++ b/CoreStore.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "CoreStore" - s.version = "1.6.2" + s.version = "1.6.3" s.license = "MIT" s.summary = "Unleashing the real power of Core Data with the elegance and safety of Swift" s.homepage = "https://github.com/JohnEstropia/CoreStore" diff --git a/CoreStore/Info.plist b/CoreStore/Info.plist index f802798..2bd8f0d 100644 --- a/CoreStore/Info.plist +++ b/CoreStore/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.6.2 + 1.6.3 CFBundleSignature ???? CFBundleVersion