From 3291441276fc2b021d44353d66e85307304f64c0 Mon Sep 17 00:00:00 2001 From: Elle Sullivan Date: Thu, 11 Apr 2024 20:44:39 +0100 Subject: [PATCH] Change to using decodingObjectOf --- .../Scheduler/DataBrokerProtectionScheduler.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LocalPackages/DataBrokerProtection/Sources/DataBrokerProtection/Scheduler/DataBrokerProtectionScheduler.swift b/LocalPackages/DataBrokerProtection/Sources/DataBrokerProtection/Scheduler/DataBrokerProtectionScheduler.swift index ac962de5ee..1c2cebe3eb 100644 --- a/LocalPackages/DataBrokerProtection/Sources/DataBrokerProtection/Scheduler/DataBrokerProtectionScheduler.swift +++ b/LocalPackages/DataBrokerProtection/Sources/DataBrokerProtection/Scheduler/DataBrokerProtectionScheduler.swift @@ -60,8 +60,8 @@ public class DataBrokerProtectionSchedulerErrorCollection: NSObject, NSSecureCod } public required init?(coder: NSCoder) { - oneTimeError = coder.decodeObject(forKey: NSSecureCodingKeys.oneTimeError) as? Error - operationErrors = coder.decodeObject(forKey: NSSecureCodingKeys.operationErrors) as? [Error] + oneTimeError = coder.decodeObject(of: NSError.self, forKey: NSSecureCodingKeys.oneTimeError) + operationErrors = coder.decodeArrayOfObjects(ofClass: NSError.self, forKey: NSSecureCodingKeys.operationErrors) } }