Skip to content

Commit

Permalink
Fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanPodymov committed Jul 19, 2024
1 parent 925ad77 commit 2d0af52
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Source/App/AppConfiguration+Data.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ extension AppConfiguration {
}

static func from(_ data: Data) -> AppConfiguration? {
guard let configuration = try? NSKeyedUnarchiver.unarchivedObject(ofClass: AppConfiguration.self, from: data) else {
let unarchiver = try? NSKeyedUnarchiver(forReadingFrom: data)
unarchiver?.requiresSecureCoding = false
guard let configuration = unarchiver?.decodeObject(of: self, forKey: NSKeyedArchiveRootObjectKey) else {
Log.unexpected(.missingValue, "Configuration could not be unarchived")
return nil
}
Expand Down

0 comments on commit 2d0af52

Please sign in to comment.