diff --git a/ios/App/App/AppDelegate.swift b/ios/App/App/AppDelegate.swift index 14e1ea72..d92f4252 100644 --- a/ios/App/App/AppDelegate.swift +++ b/ios/App/App/AppDelegate.swift @@ -12,7 +12,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { // Override point for customization after application launch. let configuration = Realm.Configuration( - schemaVersion: 20, + schemaVersion: 21, migrationBlock: { [weak self] migration, oldSchemaVersion in if (oldSchemaVersion < 1) { AbsLogger.info(message: "Realm schema version was \(oldSchemaVersion)") @@ -71,6 +71,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate { newObject?["version"] = "" } } + if (oldSchemaVersion < 21) { + // One-time wipe of accumulated logs that were freezing the app on load/clear + migration.deleteData(forType: LogEntry.className()) + } } ) Realm.Configuration.defaultConfiguration = configuration