From aebf9973151e4cc0ce1d00328917675a3591f845 Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Fri, 31 Dec 2021 20:52:22 -0800 Subject: [PATCH] Add app only protobuf --- MeshtasticClient/Persistence/Persistence.swift | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/MeshtasticClient/Persistence/Persistence.swift b/MeshtasticClient/Persistence/Persistence.swift index 9ba9d0f8..43b77da3 100644 --- a/MeshtasticClient/Persistence/Persistence.swift +++ b/MeshtasticClient/Persistence/Persistence.swift @@ -41,20 +41,11 @@ class PersistenceController { // Merge policy that favors in memory data over data in the db self.container.viewContext.mergePolicy = NSMergeByPropertyObjectTrumpMergePolicy - self.container.viewContext.automaticallyMergesChangesFromParent = true + //self.container.viewContext.automaticallyMergesChangesFromParent = true if let error = error as NSError? { - // Replace this implementation with code to handle the error appropriately. - // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. - /* - Typical reasons for an error here include: - * The parent directory does not exist, cannot be created, or disallows writing. - * The persistent store is not accessible, due to permissions or data protection when the device is locked. - * The device is out of space. - * The store could not be migrated to the current model version. - Check the error message to determine what the actual problem was. - */ + print("💥 CoreData Error: \(error.localizedDescription). Now attempting to truncate CoreData database. All app data will be lost.") self.clearDatabase() } })