From 9a2f0c3e4a91a76a5580e085904a3192810e9b29 Mon Sep 17 00:00:00 2001 From: advplyr Date: Thu, 10 Sep 2026 17:03:20 -0500 Subject: [PATCH] Add one time wipe of logs for iOS --- ios/App/App/AppDelegate.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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