From 4d04acc8cd60a19fa397fa9cd429b5ded4b3d0fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Kope=C4=87?= Date: Tue, 13 Feb 2024 20:42:56 +0100 Subject: [PATCH] Aligned with upstream branch --- Sources/ManagedModels/SchemaCompatibility/CodableBox.swift | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Sources/ManagedModels/SchemaCompatibility/CodableBox.swift b/Sources/ManagedModels/SchemaCompatibility/CodableBox.swift index 9589f1e..7a42d4b 100644 --- a/Sources/ManagedModels/SchemaCompatibility/CodableBox.swift +++ b/Sources/ManagedModels/SchemaCompatibility/CodableBox.swift @@ -57,17 +57,13 @@ final class CodableBox: NSObject, NSCopying { } } - final class Transformer: NSSecureUnarchiveFromDataTransformer { + final class Transformer: ValueTransformer { override class func transformedValueClass() -> AnyClass { CodableBox.self } override class func allowsReverseTransformation() -> Bool { true } - override class var allowedTopLevelClasses: [AnyClass] { - [ CodableBox.self, NSData.self ] - } - override func transformedValue(_ value: Any?) -> Any? { // value is the box guard let value else { return nil }