mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-01-13 04:40:32 +01:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e314db8f56 | ||
|
|
48d936d068 | ||
|
|
f3816b9abf | ||
|
|
21961780d4 | ||
|
|
305e2b61a0 | ||
|
|
588fa35c84 | ||
|
|
f6614cda66 | ||
|
|
639574d8c2 |
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "CoreStore"
|
||||
s.version = "4.2.0"
|
||||
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"
|
||||
|
||||
@@ -560,7 +560,6 @@ extension ListMonitor where ListMonitor.ObjectType: NSManagedObject {
|
||||
|
||||
fileprivate func downcast() -> ListMonitor<NSManagedObject> {
|
||||
|
||||
@inline(__always)
|
||||
func noWarnUnsafeBitCast<T, U>(_ x: T, to type: U.Type) -> U {
|
||||
|
||||
return unsafeBitCast(x, to: type)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -152,7 +152,6 @@ extension ObjectMonitor where ObjectMonitor.ObjectType: NSManagedObject {
|
||||
|
||||
fileprivate func downcast() -> ObjectMonitor<NSManagedObject> {
|
||||
|
||||
@inline(__always)
|
||||
func noWarnUnsafeBitCast<T, U>(_ x: T, to type: U.Type) -> U {
|
||||
|
||||
return unsafeBitCast(x, to: type)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -235,9 +235,8 @@ CSWhere *_Nonnull CSWherePredicate(NSPredicate *_Nonnull predicate) CORESTORE_RE
|
||||
|
||||
- (void)setAffectedStores:(NSArray<NSPersistentStore *> *_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];
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -121,8 +121,7 @@ extension CoreStoreObject {
|
||||
|
||||
return unsafeDowncast(coreStoreObject, to: self)
|
||||
}
|
||||
@inline(__always)
|
||||
func forceTypeCast<T: CoreStoreObject>(_ type: DynamicObject.Type, to: T.Type) -> T.Type {
|
||||
func forceTypeCast<T: CoreStoreObject>(_ type: AnyClass, to: T.Type) -> T.Type {
|
||||
|
||||
return type as! T.Type
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>4.2.0</string>
|
||||
<string>4.2.3</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
|
||||
@@ -350,7 +350,6 @@ extension NSData: QueryableAttributeType {
|
||||
@nonobjc @inline(__always)
|
||||
public class func cs_fromQueryableNativeType(_ value: QueryableNativeType) -> Self? {
|
||||
|
||||
@inline(__always)
|
||||
func forceCast<T: NSData>(_ value: Any) -> T? {
|
||||
|
||||
return value as? T
|
||||
@@ -380,7 +379,6 @@ extension NSDate: QueryableAttributeType {
|
||||
@nonobjc @inline(__always)
|
||||
public class func cs_fromQueryableNativeType(_ value: QueryableNativeType) -> Self? {
|
||||
|
||||
@inline(__always)
|
||||
func forceCast<T: NSDate>(_ value: Any) -> T? {
|
||||
|
||||
return value as? T
|
||||
@@ -421,7 +419,6 @@ extension NSManagedObjectID: QueryableAttributeType {
|
||||
@nonobjc @inline(__always)
|
||||
public class func cs_fromQueryableNativeType(_ value: QueryableNativeType) -> Self? {
|
||||
|
||||
@inline(__always)
|
||||
func forceCast<T: NSManagedObjectID>(_ value: Any) -> T? {
|
||||
|
||||
return value as? T
|
||||
@@ -451,7 +448,6 @@ extension NSNull: QueryableAttributeType {
|
||||
@nonobjc @inline(__always)
|
||||
public class func cs_fromQueryableNativeType(_ value: QueryableNativeType) -> Self? {
|
||||
|
||||
@inline(__always)
|
||||
func forceCast<T: NSNull>(_ value: Any) -> T? {
|
||||
|
||||
return value as? T
|
||||
@@ -481,7 +477,6 @@ extension NSNumber: QueryableAttributeType {
|
||||
@nonobjc @inline(__always)
|
||||
public class func cs_fromQueryableNativeType(_ value: QueryableNativeType) -> Self? {
|
||||
|
||||
@inline(__always)
|
||||
func forceCast<T: NSNumber>(_ value: Any) -> T? {
|
||||
|
||||
return value as? T
|
||||
@@ -511,7 +506,6 @@ extension NSString: QueryableAttributeType {
|
||||
@nonobjc @inline(__always)
|
||||
public class func cs_fromQueryableNativeType(_ value: QueryableNativeType) -> Self? {
|
||||
|
||||
@inline(__always)
|
||||
func forceCast<T: NSString>(_ value: Any) -> T? {
|
||||
|
||||
return value as? T
|
||||
|
||||
Reference in New Issue
Block a user