diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index 5bac7b3d05..127ea4ae7d 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -3858,7 +3858,6 @@ 7B8DB3192B504D7500EC16DA /* VPNAppEventsHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPNAppEventsHandler.swift; sourceTree = ""; }; 7B934C3D2A866CFF00FC8F9C /* NetworkProtectionOnboardingMenu.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkProtectionOnboardingMenu.swift; sourceTree = ""; }; 7B934C402A866DD400FC8F9C /* UserDefaults+NetworkProtectionShared.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UserDefaults+NetworkProtectionShared.swift"; sourceTree = ""; }; - 7B98CB8A2B9ADBCA000416E0 /* BrowserServicesKit */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = BrowserServicesKit; path = ../../BrowserServicesKit; sourceTree = ""; }; 7BA7CC0B2AD11D1E0042E5CE /* DuckDuckGoVPNAppStore.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = DuckDuckGoVPNAppStore.xcconfig; sourceTree = ""; }; 7BA7CC0C2AD11D1E0042E5CE /* DuckDuckGoVPN.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = DuckDuckGoVPN.xcconfig; sourceTree = ""; }; 7BA7CC0E2AD11DC80042E5CE /* DuckDuckGoVPNAppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DuckDuckGoVPNAppDelegate.swift; sourceTree = ""; }; @@ -5204,7 +5203,6 @@ 378E279C2970217400FCADA2 /* LocalPackages */ = { isa = PBXGroup; children = ( - 7B98CB8A2B9ADBCA000416E0 /* BrowserServicesKit */, 378E279D2970217400FCADA2 /* BuildToolPlugins */, 3192A2702A4C4E330084EA89 /* DataBrokerProtection */, 9DB6E7222AA0DA7A00A17F3C /* LoginItems */, diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index ac6278193f..b5a2ceceae 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -27,6 +27,15 @@ "version" : "3.0.0" } }, + { + "identity" : "browserserviceskit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/duckduckgo/BrowserServicesKit", + "state" : { + "revision" : "a32ff4084e910354bdd948812793de6b04804a1b", + "version" : "119.0.1" + } + }, { "identity" : "content-scope-scripts", "kind" : "remoteSourceControl", @@ -156,7 +165,7 @@ { "identity" : "trackerradarkit", "kind" : "remoteSourceControl", - "location" : "https://github.com/duckduckgo/TrackerRadarKit.git", + "location" : "https://github.com/duckduckgo/TrackerRadarKit", "state" : { "revision" : "a6b7ba151d9dc6684484f3785293875ec01cc1ff", "version" : "1.2.2" diff --git a/DuckDuckGoVPN/TunnelControllerIPCService.swift b/DuckDuckGoVPN/TunnelControllerIPCService.swift index c8a9ce456d..de00a53be9 100644 --- a/DuckDuckGoVPN/TunnelControllerIPCService.swift +++ b/DuckDuckGoVPN/TunnelControllerIPCService.swift @@ -21,6 +21,7 @@ import Foundation import NetworkProtection import NetworkProtectionIPC import NetworkProtectionUI +import os.log // swiftlint:disable:next os_log /// Takes care of handling incoming IPC requests from clients that need to be relayed to the tunnel, and handling state /// changes that need to be relayed back to IPC clients. diff --git a/LocalPackages/NetworkProtectionMac/Sources/NetworkProtectionIPC/TunnelControllerIPCClient.swift b/LocalPackages/NetworkProtectionMac/Sources/NetworkProtectionIPC/TunnelControllerIPCClient.swift index b429abdced..9ff3444f80 100644 --- a/LocalPackages/NetworkProtectionMac/Sources/NetworkProtectionIPC/TunnelControllerIPCClient.swift +++ b/LocalPackages/NetworkProtectionMac/Sources/NetworkProtectionIPC/TunnelControllerIPCClient.swift @@ -74,6 +74,14 @@ public final class TunnelControllerIPCClient { serverInterface: serverInterface) xpc.delegate = xpcDelegate + xpc.onDisconnect = { [weak self] in + guard let self else { return } + + // By calling register we make sure that XPC will connect as soon as it + // becomes available again, as requests are queued. This helps ensure + // that the client app will always be connected to XPC. + self.register() + } } } @@ -116,7 +124,6 @@ private final class TunnelControllerXPCClientDelegate: XPCClientInterface { connectionStatusObserver.publish(status) clientDelegate?.statusChanged(status) } - } // MARK: - Outgoing communication to the server diff --git a/LocalPackages/XPCHelper/Sources/XPCHelper/XPCClient.swift b/LocalPackages/XPCHelper/Sources/XPCHelper/XPCClient.swift index a8a5d0243c..a3ce1c6a78 100644 --- a/LocalPackages/XPCHelper/Sources/XPCHelper/XPCClient.swift +++ b/LocalPackages/XPCHelper/Sources/XPCHelper/XPCClient.swift @@ -38,6 +38,7 @@ public final class XPCClient Void)? /// The internal connection, which may still not have been created. /// @@ -98,6 +99,7 @@ public final class XPCClient