From 4f2fc0bf789e35aff69596c32306d2253dad5cec Mon Sep 17 00:00:00 2001 From: Anh Do Date: Tue, 6 Feb 2024 23:38:56 -0500 Subject: [PATCH 01/13] Update BSK --- DuckDuckGo.xcodeproj/project.pbxproj | 4 ++-- .../xcshareddata/swiftpm/Package.resolved | 4 ++-- .../EventMapping+NetworkProtectionError.swift | 3 +++ .../NetworkProtection+ConvenienceInitializers.swift | 12 +++++++++--- .../BothAppTargets/NetworkProtectionAppEvents.swift | 3 ++- .../NetworkProtectionTunnelController.swift | 3 +++ .../VPNLocation/VPNLocationViewModel.swift | 3 ++- .../NetworkProtectionUNNotificationsPresenter.swift | 4 ++++ .../MacPacketTunnelProvider.swift | 9 +++++++-- DuckDuckGoVPN/NetworkProtectionBouncer.swift | 2 +- ...etworkProtectionAgentNotificationsPresenter.swift | 4 ++++ 11 files changed, 39 insertions(+), 12 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index 03ee28b794..d80b6a7f68 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -13258,8 +13258,8 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/duckduckgo/BrowserServicesKit"; requirement = { - kind = exactVersion; - version = 104.1.1; + branch = "anh/netp-check-entitlement-while-rekeying"; + kind = branch; }; }; AA06B6B52672AF8100F541C5 /* XCRemoteSwiftPackageReference "Sparkle" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 14d15ddb50..886297a1ba 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -14,8 +14,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/duckduckgo/BrowserServicesKit", "state" : { - "revision" : "3b10ff8d5d433a4eb45a1d4d25a348033f5102c1", - "version" : "104.1.1" + "branch" : "anh/netp-check-entitlement-while-rekeying", + "revision" : "c0eb8700eea4180b12c3a968411a6d292f1bc992" } }, { diff --git a/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/EventMapping+NetworkProtectionError.swift b/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/EventMapping+NetworkProtectionError.swift index 60b9120fb0..b363c3d843 100644 --- a/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/EventMapping+NetworkProtectionError.swift +++ b/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/EventMapping+NetworkProtectionError.swift @@ -98,6 +98,9 @@ extension EventMapping where Event == NetworkProtectionError { domainEvent = .networkProtectionUnhandledError(function: function, line: line, error: error) frequency = .standard return + case .vpnAccessRevoked: + // todo + return } let debugEvent = DebugEvent(eventType: .custom(domainEvent)) diff --git a/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtection+ConvenienceInitializers.swift b/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtection+ConvenienceInitializers.swift index 0838bb0c2d..c84336d95a 100644 --- a/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtection+ConvenienceInitializers.swift +++ b/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtection+ConvenienceInitializers.swift @@ -28,7 +28,11 @@ extension NetworkProtectionDeviceManager { let settings = VPNSettings(defaults: .netP) let keyStore = NetworkProtectionKeychainKeyStore() let tokenStore = NetworkProtectionKeychainTokenStore() - return NetworkProtectionDeviceManager(environment: settings.selectedEnvironment, tokenStore: tokenStore, keyStore: keyStore, errorEvents: .networkProtectionAppDebugEvents) + return NetworkProtectionDeviceManager(environment: settings.selectedEnvironment, + tokenStore: tokenStore, + keyStore: keyStore, + errorEvents: .networkProtectionAppDebugEvents, + subscriptionConfiguration: .init(isSubscriptionEnabled: false, isEntitlementValid: { true })) } } @@ -37,14 +41,16 @@ extension NetworkProtectionCodeRedemptionCoordinator { let settings = VPNSettings(defaults: .netP) self.init(environment: settings.selectedEnvironment, tokenStore: NetworkProtectionKeychainTokenStore(), - errorEvents: .networkProtectionAppDebugEvents) + errorEvents: .networkProtectionAppDebugEvents, + isSubscriptionEnabled: false) } } extension NetworkProtectionKeychainTokenStore { convenience init() { self.init(keychainType: .default, - errorEvents: .networkProtectionAppDebugEvents) + errorEvents: .networkProtectionAppDebugEvents, + isSubscriptionEnabled: false) } } diff --git a/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionAppEvents.swift b/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionAppEvents.swift index a1e96fa4cf..81c124f1ad 100644 --- a/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionAppEvents.swift +++ b/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionAppEvents.swift @@ -99,7 +99,8 @@ final class NetworkProtectionAppEvents { let legacyServiceName = "\(Bundle.main.bundleIdentifier!).authToken" let legacyKeychainStore = NetworkProtectionKeychainTokenStore(keychainType: .dataProtection(.unspecified), serviceName: legacyServiceName, - errorEvents: nil) + errorEvents: nil, + isSubscriptionEnabled: false) guard let token = try? legacyKeychainStore.fetchToken() else { // If fetching the token fails, we just assume we can't migrate anything and the user diff --git a/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionTunnelController.swift b/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionTunnelController.swift index d5eb04eecf..4cd999e942 100644 --- a/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionTunnelController.swift +++ b/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionTunnelController.swift @@ -178,6 +178,9 @@ final class NetworkProtectionTunnelController: NetworkProtection.TunnelControlle .setDisableRekeying: // Intentional no-op as this is handled by the extension or the agent's app delegate break + case .setShouldShowExpiredEntitlementMessaging: + // todo + break } } diff --git a/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/VPNLocation/VPNLocationViewModel.swift b/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/VPNLocation/VPNLocationViewModel.swift index 38da4de2f8..00b3e5b5d5 100644 --- a/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/VPNLocation/VPNLocationViewModel.swift +++ b/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/VPNLocation/VPNLocationViewModel.swift @@ -186,7 +186,8 @@ extension NetworkProtectionLocationListCompositeRepository { self.init( environment: settings.selectedEnvironment, tokenStore: NetworkProtectionKeychainTokenStore(), - errorEvents: .networkProtectionAppDebugEvents + errorEvents: .networkProtectionAppDebugEvents, + isSubscriptionEnabled: false ) } } diff --git a/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/AppExtensionAndNotificationTargets/NetworkProtectionUNNotificationsPresenter.swift b/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/AppExtensionAndNotificationTargets/NetworkProtectionUNNotificationsPresenter.swift index 4237c816d2..b337e59020 100644 --- a/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/AppExtensionAndNotificationTargets/NetworkProtectionUNNotificationsPresenter.swift +++ b/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/AppExtensionAndNotificationTargets/NetworkProtectionUNNotificationsPresenter.swift @@ -140,6 +140,10 @@ final class NetworkProtectionUNNotificationsPresenter: NSObject, NetworkProtecti showNotification(.test, content) } + func showExpiredEntitlementNotification() { + // todo + } + private func showNotification(_ identifier: NetworkProtectionNotificationIdentifier, _ content: UNNotificationContent) { let request = UNNotificationRequest(identifier: identifier.rawValue, content: content, trigger: .none) diff --git a/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/NetworkExtensionTargets/MacPacketTunnelProvider.swift b/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/NetworkExtensionTargets/MacPacketTunnelProvider.swift index 5770b78a2f..4d4a9849fa 100644 --- a/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/NetworkExtensionTargets/MacPacketTunnelProvider.swift +++ b/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/NetworkExtensionTargets/MacPacketTunnelProvider.swift @@ -123,6 +123,9 @@ final class MacPacketTunnelProvider: PacketTunnelProvider { .failedToParseLocationListResponse: // Needs Privacy triage for macOS Geoswitching pixels return + case .vpnAccessRevoked: + // todo + return } PixelKit.fire(domainEvent, frequency: .dailyAndContinuous, includeAppVersionParameter: true) @@ -226,7 +229,8 @@ final class MacPacketTunnelProvider: PacketTunnelProvider { let debugEvents = Self.networkProtectionDebugEvents(controllerErrorStore: controllerErrorStore) let tokenStore = NetworkProtectionKeychainTokenStore(keychainType: NetworkProtectionBundle.keychainType, serviceName: Self.tokenServiceName, - errorEvents: debugEvents) + errorEvents: debugEvents, + isSubscriptionEnabled: false) let notificationsPresenter = NetworkProtectionNotificationsPresenterFactory().make(settings: settings) super.init(notificationsPresenter: notificationsPresenter, @@ -236,7 +240,8 @@ final class MacPacketTunnelProvider: PacketTunnelProvider { tokenStore: tokenStore, debugEvents: debugEvents, providerEvents: Self.packetTunnelProviderEvents, - settings: settings) + settings: settings, + subscriptionConfiguration: .init(isSubscriptionEnabled: false, isEntitlementValid: { true })) observeConnectionStatusChanges() observeServerChanges() diff --git a/DuckDuckGoVPN/NetworkProtectionBouncer.swift b/DuckDuckGoVPN/NetworkProtectionBouncer.swift index 261121df37..2f3d8d2bdb 100644 --- a/DuckDuckGoVPN/NetworkProtectionBouncer.swift +++ b/DuckDuckGoVPN/NetworkProtectionBouncer.swift @@ -30,7 +30,7 @@ final class NetworkProtectionBouncer { /// current app. /// func requireAuthTokenOrKillApp() { - let keychainStore = NetworkProtectionKeychainTokenStore(keychainType: .default, errorEvents: nil) + let keychainStore = NetworkProtectionKeychainTokenStore(keychainType: .default, errorEvents: nil, isSubscriptionEnabled: false) guard keychainStore.isFeatureActivated else { os_log(.error, log: .networkProtection, "🔴 Stopping: Network Protection not authorized.") diff --git a/NetworkProtectionSystemExtension/NetworkProtectionAgentNotificationsPresenter.swift b/NetworkProtectionSystemExtension/NetworkProtectionAgentNotificationsPresenter.swift index 7d788892e1..330643ade2 100644 --- a/NetworkProtectionSystemExtension/NetworkProtectionAgentNotificationsPresenter.swift +++ b/NetworkProtectionSystemExtension/NetworkProtectionAgentNotificationsPresenter.swift @@ -51,4 +51,8 @@ final class NetworkProtectionAgentNotificationsPresenter: NetworkProtectionNotif func showTestNotification() { notificationCenter.post(.showTestNotification) } + + func showExpiredEntitlementNotification() { + // todo + } } From 5478ba89aa218e81c8df7ee465114a365e2fcacb Mon Sep 17 00:00:00 2001 From: Anh Do Date: Tue, 6 Feb 2024 23:45:50 -0500 Subject: [PATCH 02/13] Fix swiftlint --- .../NetworkProtectionUNNotificationsPresenter.swift | 2 +- .../NetworkProtectionAgentNotificationsPresenter.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/AppExtensionAndNotificationTargets/NetworkProtectionUNNotificationsPresenter.swift b/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/AppExtensionAndNotificationTargets/NetworkProtectionUNNotificationsPresenter.swift index b337e59020..31d40732df 100644 --- a/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/AppExtensionAndNotificationTargets/NetworkProtectionUNNotificationsPresenter.swift +++ b/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/AppExtensionAndNotificationTargets/NetworkProtectionUNNotificationsPresenter.swift @@ -143,7 +143,7 @@ final class NetworkProtectionUNNotificationsPresenter: NSObject, NetworkProtecti func showExpiredEntitlementNotification() { // todo } - + private func showNotification(_ identifier: NetworkProtectionNotificationIdentifier, _ content: UNNotificationContent) { let request = UNNotificationRequest(identifier: identifier.rawValue, content: content, trigger: .none) diff --git a/NetworkProtectionSystemExtension/NetworkProtectionAgentNotificationsPresenter.swift b/NetworkProtectionSystemExtension/NetworkProtectionAgentNotificationsPresenter.swift index 330643ade2..fe428c311c 100644 --- a/NetworkProtectionSystemExtension/NetworkProtectionAgentNotificationsPresenter.swift +++ b/NetworkProtectionSystemExtension/NetworkProtectionAgentNotificationsPresenter.swift @@ -51,7 +51,7 @@ final class NetworkProtectionAgentNotificationsPresenter: NetworkProtectionNotif func showTestNotification() { notificationCenter.post(.showTestNotification) } - + func showExpiredEntitlementNotification() { // todo } From 02b231559e30dd000db4192985355064264c6bcf Mon Sep 17 00:00:00 2001 From: Anh Do Date: Wed, 21 Feb 2024 00:50:48 -0500 Subject: [PATCH 03/13] Update BSK --- DuckDuckGo.xcodeproj/project.pbxproj | 2 +- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index b2d7cb5a14..e8a7910128 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -13378,7 +13378,7 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/duckduckgo/BrowserServicesKit"; requirement = { - branch = "anh/netp-check-entitlement-while-rekeying"; + branch = "anh/netp-check-entitlement-periodically"; kind = branch; }; }; diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 91913d10f2..cad511bacd 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -14,8 +14,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/duckduckgo/BrowserServicesKit", "state" : { - "branch" : "anh/netp-check-entitlement-while-rekeying", - "revision" : "c0eb8700eea4180b12c3a968411a6d292f1bc992" + "branch" : "anh/netp-check-entitlement-periodically", + "revision" : "3282912932f735d5002fc382b96222fc8a11adbe" } }, { From f09e1cdf5a9194b6e7ea8c1aeb00237c081ca0aa Mon Sep 17 00:00:00 2001 From: Anh Do Date: Wed, 21 Feb 2024 01:08:16 -0500 Subject: [PATCH 04/13] Update BSK --- .../NetworkExtensionTargets/MacPacketTunnelProvider.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/NetworkExtensionTargets/MacPacketTunnelProvider.swift b/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/NetworkExtensionTargets/MacPacketTunnelProvider.swift index 4d4a9849fa..fc35bc44b5 100644 --- a/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/NetworkExtensionTargets/MacPacketTunnelProvider.swift +++ b/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/NetworkExtensionTargets/MacPacketTunnelProvider.swift @@ -241,7 +241,7 @@ final class MacPacketTunnelProvider: PacketTunnelProvider { debugEvents: debugEvents, providerEvents: Self.packetTunnelProviderEvents, settings: settings, - subscriptionConfiguration: .init(isSubscriptionEnabled: false, isEntitlementValid: { true })) + isSubscriptionEnabled: false) observeConnectionStatusChanges() observeServerChanges() From cb1be99204bd960499576c9243270024fe796183 Mon Sep 17 00:00:00 2001 From: Anh Do Date: Wed, 21 Feb 2024 17:37:12 -0500 Subject: [PATCH 05/13] Update BSK --- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 2 +- .../NetworkProtection+ConvenienceInitializers.swift | 2 +- .../NetworkExtensionTargets/MacPacketTunnelProvider.swift | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index cad511bacd..f816391604 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -15,7 +15,7 @@ "location" : "https://github.com/duckduckgo/BrowserServicesKit", "state" : { "branch" : "anh/netp-check-entitlement-periodically", - "revision" : "3282912932f735d5002fc382b96222fc8a11adbe" + "revision" : "a6aeda9921c6c4784d9d483f69595f2c9d5c6f5a" } }, { diff --git a/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtection+ConvenienceInitializers.swift b/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtection+ConvenienceInitializers.swift index c84336d95a..a32ca7ee85 100644 --- a/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtection+ConvenienceInitializers.swift +++ b/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtection+ConvenienceInitializers.swift @@ -32,7 +32,7 @@ extension NetworkProtectionDeviceManager { tokenStore: tokenStore, keyStore: keyStore, errorEvents: .networkProtectionAppDebugEvents, - subscriptionConfiguration: .init(isSubscriptionEnabled: false, isEntitlementValid: { true })) + isSubscriptionEnabled: false) } } diff --git a/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/NetworkExtensionTargets/MacPacketTunnelProvider.swift b/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/NetworkExtensionTargets/MacPacketTunnelProvider.swift index fc35bc44b5..e1ee637029 100644 --- a/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/NetworkExtensionTargets/MacPacketTunnelProvider.swift +++ b/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/NetworkExtensionTargets/MacPacketTunnelProvider.swift @@ -241,7 +241,8 @@ final class MacPacketTunnelProvider: PacketTunnelProvider { debugEvents: debugEvents, providerEvents: Self.packetTunnelProviderEvents, settings: settings, - isSubscriptionEnabled: false) + isSubscriptionEnabled: false, + entitlementCheck: nil) observeConnectionStatusChanges() observeServerChanges() From 560d2d5e515c0ee0cf097ef9603831afe80b0a15 Mon Sep 17 00:00:00 2001 From: Anh Do Date: Wed, 21 Feb 2024 19:08:53 -0500 Subject: [PATCH 06/13] Update BSK --- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index f816391604..43511bb980 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -15,7 +15,7 @@ "location" : "https://github.com/duckduckgo/BrowserServicesKit", "state" : { "branch" : "anh/netp-check-entitlement-periodically", - "revision" : "a6aeda9921c6c4784d9d483f69595f2c9d5c6f5a" + "revision" : "fd34480b8f6ce4ff60a1d07b222335a55296dc88" } }, { From f63d986e1e6e592c6001674b9902cf9df338dc59 Mon Sep 17 00:00:00 2001 From: Anh Do Date: Wed, 21 Feb 2024 22:41:46 -0500 Subject: [PATCH 07/13] Update BSK --- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 43511bb980..06d77ca243 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -15,7 +15,7 @@ "location" : "https://github.com/duckduckgo/BrowserServicesKit", "state" : { "branch" : "anh/netp-check-entitlement-periodically", - "revision" : "fd34480b8f6ce4ff60a1d07b222335a55296dc88" + "revision" : "3b85d36a1b15041f742f529939997bd3e9c43321" } }, { From 7bd30a3c2bf912c7dc98eb1267ef46159e98cb47 Mon Sep 17 00:00:00 2001 From: Anh Do Date: Sun, 25 Feb 2024 23:00:00 -0500 Subject: [PATCH 08/13] Update BSK --- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 06d77ca243..a68dc64856 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -15,7 +15,7 @@ "location" : "https://github.com/duckduckgo/BrowserServicesKit", "state" : { "branch" : "anh/netp-check-entitlement-periodically", - "revision" : "3b85d36a1b15041f742f529939997bd3e9c43321" + "revision" : "171221650f459d5200f16921d0027293daa27e0f" } }, { From 1369262ca542575762030d12ad17c3de973dfe62 Mon Sep 17 00:00:00 2001 From: Anh Do Date: Tue, 27 Feb 2024 00:34:05 -0500 Subject: [PATCH 09/13] Update BSK --- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index eee27d27c5..ead43293b5 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -15,7 +15,7 @@ "location" : "https://github.com/duckduckgo/BrowserServicesKit", "state" : { "branch" : "anh/netp-check-entitlement-periodically", - "revision" : "171221650f459d5200f16921d0027293daa27e0f" + "revision" : "c7559e09e50638c630835a7d1882e27ce6286f59" } }, { From 48e0f4da2834d1f9518a78eb0d85ad9c6ad0afff Mon Sep 17 00:00:00 2001 From: Anh Do Date: Tue, 27 Feb 2024 20:25:35 -0500 Subject: [PATCH 10/13] Update BSK --- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index e8469ecd93..6cc137fc00 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -15,7 +15,7 @@ "location" : "https://github.com/duckduckgo/BrowserServicesKit", "state" : { "branch" : "anh/netp-check-entitlement-periodically", - "revision" : "c7559e09e50638c630835a7d1882e27ce6286f59" + "revision" : "fad4db675d9821a0c9bc3ba5280db4bbddff9cea" } }, { From d4820e4b02ba6e6ab655a194f1ecc669d37b3aba Mon Sep 17 00:00:00 2001 From: Anh Do Date: Fri, 1 Mar 2024 00:24:01 -0500 Subject: [PATCH 11/13] Update BSK --- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 925b4fb789..a1f9be85f1 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -24,7 +24,7 @@ "location" : "https://github.com/duckduckgo/BrowserServicesKit", "state" : { "branch" : "anh/netp-check-entitlement-periodically", - "revision" : "fad4db675d9821a0c9bc3ba5280db4bbddff9cea" + "revision" : "b15baa86485732e3ab275d5b74b0995306cc56dd" } }, { From 41b1be7c1600d4d59d74836d0b53c6948b8f6ef6 Mon Sep 17 00:00:00 2001 From: Anh Do Date: Fri, 1 Mar 2024 00:28:56 -0500 Subject: [PATCH 12/13] Resolve build issues --- .../BothAppTargets/NetworkProtectionTunnelController.swift | 2 +- .../NetworkProtectionUNNotificationsPresenter.swift | 2 +- .../NetworkProtectionAgentNotificationsPresenter.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionTunnelController.swift b/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionTunnelController.swift index 37f986f016..3eb54f6f2b 100644 --- a/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionTunnelController.swift +++ b/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionTunnelController.swift @@ -242,7 +242,7 @@ final class NetworkProtectionTunnelController: TunnelController, TunnelSessionPr .setDisableRekeying: // Intentional no-op as this is handled by the extension or the agent's app delegate break - case .setShouldShowExpiredEntitlementMessaging: + case .setShowEntitlementAlert, .setShowEntitlementNotification: // todo break } diff --git a/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/AppExtensionAndNotificationTargets/NetworkProtectionUNNotificationsPresenter.swift b/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/AppExtensionAndNotificationTargets/NetworkProtectionUNNotificationsPresenter.swift index 31d40732df..3f8776fab2 100644 --- a/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/AppExtensionAndNotificationTargets/NetworkProtectionUNNotificationsPresenter.swift +++ b/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/AppExtensionAndNotificationTargets/NetworkProtectionUNNotificationsPresenter.swift @@ -140,7 +140,7 @@ final class NetworkProtectionUNNotificationsPresenter: NSObject, NetworkProtecti showNotification(.test, content) } - func showExpiredEntitlementNotification() { + func showEntitlementNotification(completion: @escaping (Error?) -> Void) { // todo } diff --git a/NetworkProtectionSystemExtension/NetworkProtectionAgentNotificationsPresenter.swift b/NetworkProtectionSystemExtension/NetworkProtectionAgentNotificationsPresenter.swift index fe428c311c..f13d10b2a0 100644 --- a/NetworkProtectionSystemExtension/NetworkProtectionAgentNotificationsPresenter.swift +++ b/NetworkProtectionSystemExtension/NetworkProtectionAgentNotificationsPresenter.swift @@ -52,7 +52,7 @@ final class NetworkProtectionAgentNotificationsPresenter: NetworkProtectionNotif notificationCenter.post(.showTestNotification) } - func showExpiredEntitlementNotification() { + func showEntitlementNotification(completion: @escaping (Error?) -> Void) { // todo } } From 5acae8548d5928a05f1bcb6b969e521ae50a1e44 Mon Sep 17 00:00:00 2001 From: Anh Do Date: Fri, 1 Mar 2024 00:44:15 -0500 Subject: [PATCH 13/13] Update BSK --- DuckDuckGo.xcodeproj/project.pbxproj | 4 ++-- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 4 ++-- LocalPackages/DataBrokerProtection/Package.swift | 2 +- LocalPackages/LoginItems/Package.swift | 2 +- LocalPackages/NetworkProtectionMac/Package.swift | 2 +- LocalPackages/SubscriptionUI/Package.swift | 2 +- LocalPackages/SyncUI/Package.swift | 2 +- LocalPackages/SystemExtensionManager/Package.swift | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index 15bbd9b6cc..6e8e3b5e8b 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -13571,8 +13571,8 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/duckduckgo/BrowserServicesKit"; requirement = { - branch = "anh/netp-check-entitlement-periodically"; - kind = branch; + kind = exactVersion; + version = 114.1.0; }; }; AA06B6B52672AF8100F541C5 /* XCRemoteSwiftPackageReference "Sparkle" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index a1f9be85f1..926e61f746 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -23,8 +23,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/duckduckgo/BrowserServicesKit", "state" : { - "branch" : "anh/netp-check-entitlement-periodically", - "revision" : "b15baa86485732e3ab275d5b74b0995306cc56dd" + "revision" : "045a8782c3dbbf79fc088b38120dea1efadc13e1", + "version" : "114.1.0" } }, { diff --git a/LocalPackages/DataBrokerProtection/Package.swift b/LocalPackages/DataBrokerProtection/Package.swift index a7379fd36f..5ee8f07b79 100644 --- a/LocalPackages/DataBrokerProtection/Package.swift +++ b/LocalPackages/DataBrokerProtection/Package.swift @@ -29,7 +29,7 @@ let package = Package( targets: ["DataBrokerProtection"]) ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "114.0.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "114.1.0"), .package(path: "../PixelKit"), .package(path: "../SwiftUIExtensions"), .package(path: "../XPCHelper"), diff --git a/LocalPackages/LoginItems/Package.swift b/LocalPackages/LoginItems/Package.swift index 1fe740a36b..5cfb2fdc98 100644 --- a/LocalPackages/LoginItems/Package.swift +++ b/LocalPackages/LoginItems/Package.swift @@ -14,7 +14,7 @@ let package = Package( ], dependencies: [ .package(url: "https://github.com/duckduckgo/apple-toolbox.git", exact: "1.0.0"), - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "114.0.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "114.1.0"), ], targets: [ .target( diff --git a/LocalPackages/NetworkProtectionMac/Package.swift b/LocalPackages/NetworkProtectionMac/Package.swift index 93dab2b900..06a84d4629 100644 --- a/LocalPackages/NetworkProtectionMac/Package.swift +++ b/LocalPackages/NetworkProtectionMac/Package.swift @@ -31,7 +31,7 @@ let package = Package( .library(name: "NetworkProtectionUI", targets: ["NetworkProtectionUI"]) ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "114.0.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "114.1.0"), .package(path: "../XPCHelper"), .package(path: "../SwiftUIExtensions"), .package(path: "../LoginItems"), diff --git a/LocalPackages/SubscriptionUI/Package.swift b/LocalPackages/SubscriptionUI/Package.swift index f05a6e354a..87ca60df92 100644 --- a/LocalPackages/SubscriptionUI/Package.swift +++ b/LocalPackages/SubscriptionUI/Package.swift @@ -12,7 +12,7 @@ let package = Package( targets: ["SubscriptionUI"]), ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "114.0.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "114.1.0"), .package(path: "../SwiftUIExtensions") ], targets: [ diff --git a/LocalPackages/SyncUI/Package.swift b/LocalPackages/SyncUI/Package.swift index 3051644e58..e970226600 100644 --- a/LocalPackages/SyncUI/Package.swift +++ b/LocalPackages/SyncUI/Package.swift @@ -15,7 +15,7 @@ let package = Package( dependencies: [ .package(path: "../SwiftUIExtensions"), .package(url: "https://github.com/duckduckgo/apple-toolbox.git", exact: "1.0.0"), - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "114.0.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "114.1.0"), ], targets: [ .target( diff --git a/LocalPackages/SystemExtensionManager/Package.swift b/LocalPackages/SystemExtensionManager/Package.swift index 618cd73010..c109fc05ba 100644 --- a/LocalPackages/SystemExtensionManager/Package.swift +++ b/LocalPackages/SystemExtensionManager/Package.swift @@ -17,7 +17,7 @@ let package = Package( ], dependencies: [ .package(url: "https://github.com/duckduckgo/apple-toolbox.git", exact: "1.0.0"), - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "114.0.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "114.1.0"), ], targets: [ // Targets are the basic building blocks of a package, defining a module or a test suite.