goodbye ObjectiveC

This commit is contained in:
John Estropia
2021-09-22 20:04:58 +09:00
parent bf10f4668c
commit 9a026afe40
110 changed files with 1060 additions and 9816 deletions

View File

@@ -29,47 +29,30 @@ import CoreData
// MARK: - NSManagedObject
@available(*, unavailable, message: "CoreStore Objective-C is now obsoleted in preparation for Swift concurrency.")
extension NSManagedObject {
/**
Provides a convenience wrapper for accessing `-primitiveValueForKey:` with proper calls to `-willAccessValueForKey:` and `-didAccessValueForKey:`. This is useful when implementing accessor methods for transient attributes.
- parameter KVCKey: the KVC key
- returns: the primitive value for the KVC key
*/
@objc
public func cs_accessValueForKVCKey(_ KVCKey: KeyPathString) -> Any? {
return self.getValue(forKvcKey: KVCKey)
fatalError()
}
/**
Provides a convenience wrapper for setting `-setPrimitiveValue:` with proper calls to `-willChangeValueForKey:` and `-didChangeValueForKey:`. This is useful when implementing mutator methods for transient attributes.
- parameter value: the value to set the KVC key with
- parameter KVCKey: the KVC key
*/
@objc
public func cs_setValue(_ value: Any?, forKVCKey KVCKey: KeyPathString) {
self.setValue(value, forKvcKey: KVCKey)
fatalError()
}
/**
Re-faults the object to use the latest values from the persistent store
*/
@objc
public func cs_refreshAsFault() {
self.refreshAsFault()
fatalError()
}
/**
Re-faults the object to use the latest values from the persistent store and merges previously pending changes back
*/
@nonobjc
public func cs_refreshAndMerge() {
self.refreshAndMerge()
fatalError()
}
}