From 8378819621c7ec1493748805b8c95c25620c4434 Mon Sep 17 00:00:00 2001 From: Mariusz Klochowicz Date: Wed, 15 Oct 2025 10:25:02 +1030 Subject: [PATCH] fix(apple): Ensure fetching resource state if already connected (#10567) Fixes an issue where the Resources menu would not populate when launching the app while already connected by ensuring the initial VPN status triggers the resource loading handler. Fixes #9837 --- .../FirezoneKit/Sources/FirezoneKit/Stores/Store.swift | 6 +++++- website/src/components/Changelog/Apple.tsx | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/swift/apple/FirezoneKit/Sources/FirezoneKit/Stores/Store.swift b/swift/apple/FirezoneKit/Sources/FirezoneKit/Stores/Store.swift index bc1139005..44318f4bb 100644 --- a/swift/apple/FirezoneKit/Sources/FirezoneKit/Stores/Store.swift +++ b/swift/apple/FirezoneKit/Sources/FirezoneKit/Stores/Store.swift @@ -107,7 +107,11 @@ public final class Store: ObservableObject { try await self?.handleVPNStatusChange(newVPNStatus: status) } try ipcClient().subscribeToVPNStatusUpdates(handler: vpnStatusChangeHandler) - self.vpnStatus = try ipcClient().sessionStatus() + + let initialStatus = try ipcClient().sessionStatus() + + // Handle initial status to ensure resources start loading if already connected + try await handleVPNStatusChange(newVPNStatus: initialStatus) } private func handleVPNStatusChange(newVPNStatus: NEVPNStatus) async throws { diff --git a/website/src/components/Changelog/Apple.tsx b/website/src/components/Changelog/Apple.tsx index 1e5b649c9..745d08bfe 100644 --- a/website/src/components/Changelog/Apple.tsx +++ b/website/src/components/Changelog/Apple.tsx @@ -32,6 +32,10 @@ export default function Apple() { Improves reliability by caching DNS responses as per their TTL. + + Fixes an issue where the Resources menu would not populate when + launching the app while already connected. +