diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index aae4f772c1..6e8e3b5e8b 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -13572,7 +13572,7 @@ repositoryURL = "https://github.com/duckduckgo/BrowserServicesKit"; requirement = { kind = exactVersion; - version = 114.0.0; + 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 fb698a0306..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" : { - "revision" : "c9eae1b4a4ce5b6854d6934e57f900f62d2f3917", - "version" : "114.0.0" + "revision" : "045a8782c3dbbf79fc088b38120dea1efadc13e1", + "version" : "114.1.0" } }, { 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..a32ca7ee85 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, + isSubscriptionEnabled: false) } } @@ -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/NetworkProtectionTunnelController.swift b/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionTunnelController.swift index e86a508f2d..3eb54f6f2b 100644 --- a/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionTunnelController.swift +++ b/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionTunnelController.swift @@ -242,6 +242,9 @@ final class NetworkProtectionTunnelController: TunnelController, TunnelSessionPr .setDisableRekeying: // Intentional no-op as this is handled by the extension or the agent's app delegate break + case .setShowEntitlementAlert, .setShowEntitlementNotification: + // todo + break } } diff --git a/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/VPNLocation/VPNLocationViewModel.swift b/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/VPNLocation/VPNLocationViewModel.swift index bc0a0e042f..f77d8fd032 100644 --- a/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/VPNLocation/VPNLocationViewModel.swift +++ b/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/VPNLocation/VPNLocationViewModel.swift @@ -191,7 +191,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..3f8776fab2 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 showEntitlementNotification(completion: @escaping (Error?) -> Void) { + // 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 af8f42cb74..ee8e936733 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: Bundle.keychainType, serviceName: Self.tokenServiceName, - errorEvents: debugEvents) + errorEvents: debugEvents, + isSubscriptionEnabled: false) let notificationsPresenter = NetworkProtectionNotificationsPresenterFactory().make(settings: settings) super.init(notificationsPresenter: notificationsPresenter, @@ -236,7 +240,9 @@ final class MacPacketTunnelProvider: PacketTunnelProvider { tokenStore: tokenStore, debugEvents: debugEvents, providerEvents: Self.packetTunnelProviderEvents, - settings: settings) + settings: settings, + isSubscriptionEnabled: false, + entitlementCheck: nil) observeServerChanges() observeStatusUpdateRequests() 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/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. diff --git a/NetworkProtectionSystemExtension/NetworkProtectionAgentNotificationsPresenter.swift b/NetworkProtectionSystemExtension/NetworkProtectionAgentNotificationsPresenter.swift index 7d788892e1..f13d10b2a0 100644 --- a/NetworkProtectionSystemExtension/NetworkProtectionAgentNotificationsPresenter.swift +++ b/NetworkProtectionSystemExtension/NetworkProtectionAgentNotificationsPresenter.swift @@ -51,4 +51,8 @@ final class NetworkProtectionAgentNotificationsPresenter: NetworkProtectionNotif func showTestNotification() { notificationCenter.post(.showTestNotification) } + + func showEntitlementNotification(completion: @escaping (Error?) -> Void) { + // todo + } }