Skip to content

Commit

Permalink
Aligned with upstream branch
Browse files Browse the repository at this point in the history
  • Loading branch information
admkopec committed Feb 13, 2024
1 parent c81b270 commit 4d04acc
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Sources/ManagedModels/SchemaCompatibility/CodableBox.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,13 @@ final class CodableBox<T: Codable>: NSObject, NSCopying {
}
}

final class Transformer: NSSecureUnarchiveFromDataTransformer {
final class Transformer: ValueTransformer {

override class func transformedValueClass() -> AnyClass {
CodableBox<T>.self
}
override class func allowsReverseTransformation() -> Bool { true }

override class var allowedTopLevelClasses: [AnyClass] {
[ CodableBox<T>.self, NSData.self ]
}

override func transformedValue(_ value: Any?) -> Any? {
// value is the box
guard let value else { return nil }
Expand Down

0 comments on commit 4d04acc

Please sign in to comment.