From cf837a35071a1ae4ce92fb13d70bf63ccec75b0a Mon Sep 17 00:00:00 2001 From: Jamil Date: Mon, 24 Feb 2025 10:44:55 -0800 Subject: [PATCH] fix(apple): Pass menuBar to AppView (#8249) A regression was introduced in #8218 that removed the `menuBar` as an environment object for `AppView`. Unfortunately this compiles just fine, as EnvironmentObjects are loaded at runtime, causing the "Open Menu" button to crash since it's looking for a non-existent EnvironmentObject. --- swift/apple/Firezone/Application/FirezoneApp.swift | 7 ++++--- website/src/components/Changelog/Apple.tsx | 7 ++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/swift/apple/Firezone/Application/FirezoneApp.swift b/swift/apple/Firezone/Application/FirezoneApp.swift index 54e083ee4..d9c0f3507 100644 --- a/swift/apple/Firezone/Application/FirezoneApp.swift +++ b/swift/apple/Firezone/Application/FirezoneApp.swift @@ -40,12 +40,13 @@ struct FirezoneApp: App { "Welcome to Firezone", id: AppView.WindowDefinition.main.identifier ) { - if appDelegate.menuBar == nil { - ProgressView("Loading...") - } else { + if let menuBar = appDelegate.menuBar { // menuBar will be initialized by this point AppView() .environmentObject(store) + .environmentObject(menuBar) + } else { + ProgressView("Loading...") } } .handlesExternalEvents( diff --git a/website/src/components/Changelog/Apple.tsx b/website/src/components/Changelog/Apple.tsx index 408ee3f6f..de6948b1e 100644 --- a/website/src/components/Changelog/Apple.tsx +++ b/website/src/components/Changelog/Apple.tsx @@ -19,7 +19,12 @@ export default function Apple() { return ( {/* When you cut a release, remove any solved issues from the "known issues" lists over in `client-apps`. This must not be done when the issue's PR merges. */} - + + + Fixes a regression that caused a crash if "Open menu" was clicked in + the Welcome screen. + + Fixes a crash that occurred if the system reports invalid DNS servers.