mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-25 10:51:59 +01:00
Merge branch 'prototype/Swift_4_0' into prototype/queryBuilders
# Conflicts: # Sources/OrderBy.swift
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
Pod::Spec.new do |s|
|
Pod::Spec.new do |s|
|
||||||
s.name = "CoreStore"
|
s.name = "CoreStore"
|
||||||
s.version = "4.1.1"
|
s.version = "4.1.3"
|
||||||
s.license = "MIT"
|
s.license = "MIT"
|
||||||
s.summary = "Unleashing the real power of Core Data with the elegance and safety of Swift"
|
s.summary = "Unleashing the real power of Core Data with the elegance and safety of Swift"
|
||||||
s.homepage = "https://github.com/JohnEstropia/CoreStore"
|
s.homepage = "https://github.com/JohnEstropia/CoreStore"
|
||||||
|
|||||||
@@ -786,6 +786,7 @@
|
|||||||
B52F743C1E9B8724005F3DAC /* XcodeDataModelSchema.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XcodeDataModelSchema.swift; sourceTree = "<group>"; };
|
B52F743C1E9B8724005F3DAC /* XcodeDataModelSchema.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XcodeDataModelSchema.swift; sourceTree = "<group>"; };
|
||||||
B52F74491E9B8740005F3DAC /* CoreStoreSchema.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CoreStoreSchema.swift; sourceTree = "<group>"; };
|
B52F74491E9B8740005F3DAC /* CoreStoreSchema.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CoreStoreSchema.swift; sourceTree = "<group>"; };
|
||||||
B52FD3A91E3B3EF10001D919 /* NSManagedObject+Logging.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSManagedObject+Logging.swift"; sourceTree = "<group>"; };
|
B52FD3A91E3B3EF10001D919 /* NSManagedObject+Logging.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSManagedObject+Logging.swift"; sourceTree = "<group>"; };
|
||||||
|
B53205791F74E9170023927D /* .cocoapods.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = .cocoapods.yml; sourceTree = "<group>"; };
|
||||||
B533C4DA1D7D4BFA001383CB /* DispatchQueue+CoreStore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "DispatchQueue+CoreStore.swift"; sourceTree = "<group>"; };
|
B533C4DA1D7D4BFA001383CB /* DispatchQueue+CoreStore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "DispatchQueue+CoreStore.swift"; sourceTree = "<group>"; };
|
||||||
B538BA701D15B3E30003A766 /* CoreStoreBridge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CoreStoreBridge.m; sourceTree = "<group>"; };
|
B538BA701D15B3E30003A766 /* CoreStoreBridge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CoreStoreBridge.m; sourceTree = "<group>"; };
|
||||||
B53B275E1EE3B92E00E9B352 /* CoreStoreManagedObject.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CoreStoreManagedObject.swift; sourceTree = "<group>"; };
|
B53B275E1EE3B92E00E9B352 /* CoreStoreManagedObject.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CoreStoreManagedObject.swift; sourceTree = "<group>"; };
|
||||||
@@ -1064,6 +1065,7 @@
|
|||||||
B5E84ED91AFF82360064E85B /* LICENSE */,
|
B5E84ED91AFF82360064E85B /* LICENSE */,
|
||||||
B5D9C8F61B160ED200E64F0E /* CoreStore.podspec */,
|
B5D9C8F61B160ED200E64F0E /* CoreStore.podspec */,
|
||||||
B5BDC91A1C202269008147CD /* Cartfile */,
|
B5BDC91A1C202269008147CD /* Cartfile */,
|
||||||
|
B53205791F74E9170023927D /* .cocoapods.yml */,
|
||||||
B5BDC9271C2024F2008147CD /* .travis.yml */,
|
B5BDC9271C2024F2008147CD /* .travis.yml */,
|
||||||
B5AD60CD1C90141E00F2B2E8 /* Package.swift */,
|
B5AD60CD1C90141E00F2B2E8 /* Package.swift */,
|
||||||
);
|
);
|
||||||
|
|||||||
2
Sources/.cocoapods.yml
Normal file
2
Sources/.cocoapods.yml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
try:
|
||||||
|
project: 'CoreStore.xcworkspace'
|
||||||
@@ -121,7 +121,12 @@ extension CoreStoreObject {
|
|||||||
|
|
||||||
return unsafeDowncast(coreStoreObject, to: self)
|
return unsafeDowncast(coreStoreObject, to: self)
|
||||||
}
|
}
|
||||||
let coreStoreObject = self.init(rawObject: object)
|
@inline(__always)
|
||||||
|
func forceTypeCast<T: CoreStoreObject>(_ type: DynamicObject.Type, to: T.Type) -> T.Type {
|
||||||
|
|
||||||
|
return type as! T.Type
|
||||||
|
}
|
||||||
|
let coreStoreObject = forceTypeCast(object.entity.dynamicObjectType!, to: self).init(rawObject: object)
|
||||||
object.coreStoreObject = coreStoreObject
|
object.coreStoreObject = coreStoreObject
|
||||||
return coreStoreObject
|
return coreStoreObject
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>FMWK</string>
|
<string>FMWK</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>4.1.1</string>
|
<string>4.1.3</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
|
|||||||
@@ -31,6 +31,17 @@ import Foundation
|
|||||||
|
|
||||||
internal extension NSEntityDescription {
|
internal extension NSEntityDescription {
|
||||||
|
|
||||||
|
@nonobjc
|
||||||
|
internal var dynamicObjectType: DynamicObject.Type? {
|
||||||
|
|
||||||
|
guard let userInfo = self.userInfo,
|
||||||
|
let typeName = userInfo[UserInfoKey.CoreStoreManagedObjectTypeName] as! String? else {
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return (NSClassFromString(typeName) as! DynamicObject.Type)
|
||||||
|
}
|
||||||
|
|
||||||
@nonobjc
|
@nonobjc
|
||||||
internal var coreStoreEntity: DynamicEntity? {
|
internal var coreStoreEntity: DynamicEntity? {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user