From 52f13086c999aa43094f904d812ed7ef83299fdd Mon Sep 17 00:00:00 2001 From: Shlomo <78599753+ShlomoCode@users.noreply.github.com> Date: Mon, 20 Oct 2025 19:07:25 +0300 Subject: [PATCH] chore(macos): enable secure restorable state (#2770) Manual apply of https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/macos/migrations/secure_restorable_state_migration.dart --- app/macos/Runner/AppDelegate.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/macos/Runner/AppDelegate.swift b/app/macos/Runner/AppDelegate.swift index 7188fe9d..35591ac9 100644 --- a/app/macos/Runner/AppDelegate.swift +++ b/app/macos/Runner/AppDelegate.swift @@ -19,6 +19,10 @@ class AppDelegate: FlutterAppDelegate { private var pendingStringsObservation: Defaults.Observation? private var isLaunchedAsLoginItem: Bool? + override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool { + return true + } + override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { // LocalSend handles the close event manually return false