recreate legacy project for testing

This commit is contained in:
Joe Mattiello
2023-03-01 08:04:31 -05:00
parent 493b3783f0
commit f3a70e1e47
31 changed files with 3911 additions and 28 deletions

View File

@@ -95,7 +95,12 @@ public class AppPermission: NSManagedObject, Decodable, Fetchable {
usageDescription = try container.decode(String.self, forKey: .usageDescription)
let rawType = try container.decode(String.self, forKey: .type)
type = ALTAppPermissionType(rawValue: rawType)
guard let type = ALTAppPermissionType(rawValue: rawType) else {
throw DecodingError.dataCorrupted(
DecodingError.Context(codingPath: [CodingKeys.type],
debugDescription: "Invalid value for `ALTAppPermissionType` \"\(rawType)\""))
}
self.type = type
} catch {
if let context = managedObjectContext {
context.delete(self)