From 305e2b61a000753b6f1aff7f3f6485a88b3ff4e7 Mon Sep 17 00:00:00 2001 From: John Rommel Estropia Date: Sun, 29 Oct 2017 15:20:58 +0900 Subject: [PATCH 1/5] fix compile errors for Xcode 9.1 beta --- Sources/CSListObserver.swift | 2 +- Sources/CSObjectObserver.swift | 2 +- Sources/CoreDataNativeType.swift | 2 +- Sources/CoreStoreBridge.swift | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/CSListObserver.swift b/Sources/CSListObserver.swift index ff57b34..e9dfafd 100644 --- a/Sources/CSListObserver.swift +++ b/Sources/CSListObserver.swift @@ -42,7 +42,7 @@ import CoreData */ @available(OSX 10.12, *) @objc -public protocol CSListObserver: class, AnyObject { +public protocol CSListObserver: class { /** Handles processing just before a change to the observed list occurs diff --git a/Sources/CSObjectObserver.swift b/Sources/CSObjectObserver.swift index 32fd3f9..a5392eb 100644 --- a/Sources/CSObjectObserver.swift +++ b/Sources/CSObjectObserver.swift @@ -40,7 +40,7 @@ import CoreData */ @available(OSX 10.12, *) @objc -public protocol CSObjectObserver: class, AnyObject { +public protocol CSObjectObserver: class { /** Handles processing just before a change to the observed `object` occurs diff --git a/Sources/CoreDataNativeType.swift b/Sources/CoreDataNativeType.swift index c382a6a..a358fd5 100644 --- a/Sources/CoreDataNativeType.swift +++ b/Sources/CoreDataNativeType.swift @@ -33,7 +33,7 @@ import CoreData Objective-C Foundation types that are natively supported by Core Data managed attributes all conform to `CoreDataNativeType`. */ @objc -public protocol CoreDataNativeType: class, NSObjectProtocol, AnyObject {} +public protocol CoreDataNativeType: class, NSObjectProtocol {} // MARK: - NSNumber diff --git a/Sources/CoreStoreBridge.swift b/Sources/CoreStoreBridge.swift index 7d77680..33ee605 100644 --- a/Sources/CoreStoreBridge.swift +++ b/Sources/CoreStoreBridge.swift @@ -31,7 +31,7 @@ import Foundation /** `CoreStoreObjectiveCType`s are Objective-C accessible classes that represent CoreStore's Swift types. */ -public protocol CoreStoreObjectiveCType: class, AnyObject { +public protocol CoreStoreObjectiveCType: class { /** The corresponding Swift type From 21961780d484a4204cd9931f752ccc61b0a311e9 Mon Sep 17 00:00:00 2001 From: John Estropia Date: Wed, 1 Nov 2017 11:33:41 +0900 Subject: [PATCH 2/5] force dynamic typing on DynamicObject.Type to mitigate optimization issues --- Sources/DynamicObject.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/DynamicObject.swift b/Sources/DynamicObject.swift index cf148af..b6af806 100644 --- a/Sources/DynamicObject.swift +++ b/Sources/DynamicObject.swift @@ -121,7 +121,7 @@ extension CoreStoreObject { return unsafeDowncast(coreStoreObject, to: self) } - func forceTypeCast(_ type: DynamicObject.Type, to: T.Type) -> T.Type { + func forceTypeCast(_ type: AnyClass, to: T.Type) -> T.Type { return type as! T.Type } From f3816b9abf85ecea335b5608c79e5e507e8686d9 Mon Sep 17 00:00:00 2001 From: John Estropia Date: Wed, 1 Nov 2017 19:49:42 +0900 Subject: [PATCH 3/5] update for Xcode 9.1 --- CoreStore.podspec | 2 +- Sources/Info.plist | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CoreStore.podspec b/CoreStore.podspec index 785d052..c39b448 100644 --- a/CoreStore.podspec +++ b/CoreStore.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "CoreStore" - s.version = "4.2.1" + s.version = "4.2.2" 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/Sources/Info.plist b/Sources/Info.plist index 1461558..0c28f00 100644 --- a/Sources/Info.plist +++ b/Sources/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 4.2.1 + 4.2.2 CFBundleSignature ???? CFBundleVersion From 48d936d0689422befa09459d7c82091ed0843c7e Mon Sep 17 00:00:00 2001 From: John Estropia Date: Thu, 9 Nov 2017 19:44:27 +0900 Subject: [PATCH 4/5] Fix regression for ARC bugfix (fixes #221) --- Sources/CoreStoreBridge.m | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Sources/CoreStoreBridge.m b/Sources/CoreStoreBridge.m index 82763b2..a5cb1c9 100644 --- a/Sources/CoreStoreBridge.m +++ b/Sources/CoreStoreBridge.m @@ -235,9 +235,8 @@ CSWhere *_Nonnull CSWherePredicate(NSPredicate *_Nonnull predicate) CORESTORE_RE - (void)setAffectedStores:(NSArray *_Nullable)affectedStores { - NSProcessInfo *processInfo = [NSProcessInfo processInfo]; - if ([processInfo isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){ 11, 0, 0 }] - || ![processInfo isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){ 10, 0, 0 }]) { + if (NSFoundationVersionNumber < NSFoundationVersionNumber10_0 + || [[NSProcessInfo processInfo] isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){ 11, 0, 0 }]) { self.safeAffectedStores = affectedStores; [super setAffectedStores:affectedStores]; From e314db8f56b83f2cc761a70cdfc3b823b9815c03 Mon Sep 17 00:00:00 2001 From: John Estropia Date: Thu, 9 Nov 2017 19:45:21 +0900 Subject: [PATCH 5/5] version bump --- CoreStore.podspec | 2 +- Sources/Info.plist | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CoreStore.podspec b/CoreStore.podspec index c39b448..61f6a55 100644 --- a/CoreStore.podspec +++ b/CoreStore.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "CoreStore" - s.version = "4.2.2" + s.version = "4.2.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/Sources/Info.plist b/Sources/Info.plist index 0c28f00..e07b407 100644 --- a/Sources/Info.plist +++ b/Sources/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 4.2.2 + 4.2.3 CFBundleSignature ???? CFBundleVersion