diff --git a/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionAppEvents.swift b/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionAppEvents.swift index fc494b066e..48c5e2dfa1 100644 --- a/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionAppEvents.swift +++ b/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionAppEvents.swift @@ -121,6 +121,11 @@ final class NetworkProtectionAppEvents { versionStore.lastVersionRun = currentVersion } +#if DEBUG + // For debug builds we always want to restart the VPN and VPN menu app to ensure + // the latest is loaded + restartNetworkProtectionTunnelAndMenu(using: loginItemsManager) +#else // should‘ve been run at least once with NetP enabled guard let lastVersionRun = versionStore.lastVersionRun else { os_log(.info, log: .networkProtection, "No last version found for the NetP login items, skipping update") @@ -131,6 +136,7 @@ final class NetworkProtectionAppEvents { os_log(.info, log: .networkProtection, "App updated from %{public}s to %{public}s: updating login items", lastVersionRun, currentVersion) restartNetworkProtectionTunnelAndMenu(using: loginItemsManager) } +#endif } private func restartNetworkProtectionTunnelAndMenu(using loginItemsManager: LoginItemsManager) {