Post

Replies

Boosts

Views

Activity

Reply to SwiftData error: NSKeyedUnarchiveFromData' should not be used to for un-archiving and will be removed in a future release
This is still an issue for me in Xcode 15 RC. Below is an example of the transformer I'm using for saving a UIColor final class ColorValueTransformer: NSSecureUnarchiveFromDataTransformer { static let name = NSValueTransformerName(rawValue: String(describing: ColorValueTransformer.self)) override static var allowedTopLevelClasses: [AnyClass] { return [UIColor.self] } public static func register() { let transformer = ColorValueTransformer() ValueTransformer.setValueTransformer(transformer, forName: name) } }
Sep ’23