diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index aa8833b98c..3eacedf348 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -12976,7 +12976,7 @@ repositoryURL = "https://github.com/duckduckgo/BrowserServicesKit"; requirement = { kind = exactVersion; - version = 97.0.0; + version = 98.0.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 9080829d51..805101ac61 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" : "d671accf1bf7097c4e7f5cd55cd1c6dfa005cf92", - "version" : "97.0.0" + "revision" : "064ed560f19fbfd36eb02decebf944689818ed35", + "version" : "98.0.0" } }, { diff --git a/DuckDuckGo/ContentBlocker/Mocks/MockPrivacyConfiguration.swift b/DuckDuckGo/ContentBlocker/Mocks/MockPrivacyConfiguration.swift index df918a336e..f8dc30a6ae 100644 --- a/DuckDuckGo/ContentBlocker/Mocks/MockPrivacyConfiguration.swift +++ b/DuckDuckGo/ContentBlocker/Mocks/MockPrivacyConfiguration.swift @@ -51,6 +51,16 @@ final class MockPrivacyConfiguration: PrivacyConfiguration { func userDisabledProtection(forDomain: String) {} } +final class MockInternalUserStoring: InternalUserStoring { + var isInternalUser: Bool = false +} + +extension DefaultInternalUserDecider { + convenience init(mockedStore: MockInternalUserStoring = MockInternalUserStoring()) { + self.init(store: mockedStore) + } +} + final class MockPrivacyConfigurationManager: NSObject, PrivacyConfigurationManaging { var embeddedConfigData: BrowserServicesKit.PrivacyConfigurationManager.ConfigurationData { fatalError("not implemented") @@ -70,6 +80,7 @@ final class MockPrivacyConfigurationManager: NSObject, PrivacyConfigurationManag var updatesPublisher: AnyPublisher = Just(()).eraseToAnyPublisher() var privacyConfig: PrivacyConfiguration = MockPrivacyConfiguration() + var internalUserDecider: InternalUserDecider = DefaultInternalUserDecider() } #endif diff --git a/DuckDuckGoDBPBackgroundAgent/DBPMocks.swift b/DuckDuckGoDBPBackgroundAgent/DBPMocks.swift index 87b6e010a6..b184a883df 100644 --- a/DuckDuckGoDBPBackgroundAgent/DBPMocks.swift +++ b/DuckDuckGoDBPBackgroundAgent/DBPMocks.swift @@ -56,21 +56,23 @@ final class PrivacyConfigurationManagingMock: PrivacyConfigurationManaging { guard let privacyConfigurationData = try? PrivacyConfigurationData(data: data) else { fatalError("Could not retrieve privacy configuration data") } - let privacyConfig = privacyConfiguration(withData: privacyConfigurationData) + let privacyConfig = privacyConfiguration(withData: privacyConfigurationData, internalUserDecider: internalUserDecider) return privacyConfig } + var internalUserDecider: InternalUserDecider = DefaultInternalUserDecider(store: InternalUserDeciderStoreMock()) + func reload(etag: String?, data: Data?) -> PrivacyConfigurationManager.ReloadResult { .downloaded } } -func privacyConfiguration(withData data: PrivacyConfigurationData) -> PrivacyConfiguration { +func privacyConfiguration(withData data: PrivacyConfigurationData, internalUserDecider: InternalUserDecider) -> PrivacyConfiguration { let domain = MockDomainsProtectionStore() return AppPrivacyConfiguration(data: data, identifier: UUID().uuidString, localProtection: domain, - internalUserDecider: DefaultInternalUserDecider(store: InternalUserDeciderStoreMock())) + internalUserDecider: internalUserDecider) } final class MockDomainsProtectionStore: DomainsProtectionStore { diff --git a/LocalPackages/Account/Package.swift b/LocalPackages/Account/Package.swift index b32006c664..54ad9d3e9b 100644 --- a/LocalPackages/Account/Package.swift +++ b/LocalPackages/Account/Package.swift @@ -12,7 +12,7 @@ let package = Package( targets: ["Account"]), ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "97.0.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "98.0.0"), .package(path: "../Purchase") ], targets: [ diff --git a/LocalPackages/DataBrokerProtection/Package.swift b/LocalPackages/DataBrokerProtection/Package.swift index ec47443f0f..3852ed9842 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: "97.0.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "98.0.0"), .package(path: "../PixelKit"), .package(path: "../SwiftUIExtensions"), .package(path: "../XPCHelper") diff --git a/LocalPackages/DataBrokerProtection/Sources/DataBrokerProtection/CCF/DataBrokerProtectionUtils.swift b/LocalPackages/DataBrokerProtection/Sources/DataBrokerProtection/CCF/DataBrokerProtectionUtils.swift index 5177325d43..d65b1653b2 100644 --- a/LocalPackages/DataBrokerProtection/Sources/DataBrokerProtection/CCF/DataBrokerProtectionUtils.swift +++ b/LocalPackages/DataBrokerProtection/Sources/DataBrokerProtection/CCF/DataBrokerProtectionUtils.swift @@ -163,6 +163,7 @@ private class PrivacyConfigurationDataBrokerProtectionConfigOverride: PrivacyCon var base: Data var updatesPublisher: AnyPublisher<(), Never> var privacyConfig: PrivacyConfiguration + var internalUserDecider: InternalUserDecider var currentConfig: Data { return updateConfigWithBrokerProtection() @@ -176,6 +177,7 @@ private class PrivacyConfigurationDataBrokerProtectionConfigOverride: PrivacyCon base = manager.currentConfig updatesPublisher = manager.updatesPublisher privacyConfig = manager.privacyConfig + internalUserDecider = manager.internalUserDecider } private func updateConfigWithBrokerProtection() -> Data { diff --git a/LocalPackages/DataBrokerProtection/Tests/DataBrokerProtectionTests/Mocks.swift b/LocalPackages/DataBrokerProtection/Tests/DataBrokerProtectionTests/Mocks.swift index d33f4b6e5b..b9699bd4e2 100644 --- a/LocalPackages/DataBrokerProtection/Tests/DataBrokerProtectionTests/Mocks.swift +++ b/LocalPackages/DataBrokerProtection/Tests/DataBrokerProtectionTests/Mocks.swift @@ -58,6 +58,10 @@ extension DataBrokerScheduleConfig { } } +final class InternalUserDeciderStoreMock: InternalUserStoring { + var isInternalUser: Bool = false +} + final class PrivacyConfigurationManagingMock: PrivacyConfigurationManaging { var currentConfig: Data = Data() @@ -65,6 +69,8 @@ final class PrivacyConfigurationManagingMock: PrivacyConfigurationManaging { var privacyConfig: BrowserServicesKit.PrivacyConfiguration = PrivacyConfigurationMock() + var internalUserDecider: InternalUserDecider = DefaultInternalUserDecider(store: InternalUserDeciderStoreMock()) + func reload(etag: String?, data: Data?) -> PrivacyConfigurationManager.ReloadResult { .downloaded } diff --git a/LocalPackages/LoginItems/Package.swift b/LocalPackages/LoginItems/Package.swift index 54a86db801..df220e7be9 100644 --- a/LocalPackages/LoginItems/Package.swift +++ b/LocalPackages/LoginItems/Package.swift @@ -13,7 +13,7 @@ let package = Package( ), ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "97.0.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "98.0.0"), ], targets: [ .target( diff --git a/LocalPackages/NetworkProtectionMac/Package.swift b/LocalPackages/NetworkProtectionMac/Package.swift index e7fb30c89e..55b684a01e 100644 --- a/LocalPackages/NetworkProtectionMac/Package.swift +++ b/LocalPackages/NetworkProtectionMac/Package.swift @@ -30,7 +30,7 @@ let package = Package( .library(name: "NetworkProtectionUI", targets: ["NetworkProtectionUI"]) ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "97.0.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "98.0.0"), .package(path: "../XPCHelper"), .package(path: "../SwiftUIExtensions") ], diff --git a/LocalPackages/PixelKit/Package.swift b/LocalPackages/PixelKit/Package.swift index aaaa2d9e09..93cfe4bf75 100644 --- a/LocalPackages/PixelKit/Package.swift +++ b/LocalPackages/PixelKit/Package.swift @@ -20,7 +20,7 @@ let package = Package( ) ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "97.0.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "98.0.0"), ], targets: [ .target( diff --git a/LocalPackages/Purchase/Package.swift b/LocalPackages/Purchase/Package.swift index 6ebc16624c..1bca7b0dd1 100644 --- a/LocalPackages/Purchase/Package.swift +++ b/LocalPackages/Purchase/Package.swift @@ -13,7 +13,7 @@ let package = Package( ), ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "97.0.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "98.0.0"), ], targets: [ .target( diff --git a/LocalPackages/Subscription/Package.swift b/LocalPackages/Subscription/Package.swift index e9b73b884a..77a66800a4 100644 --- a/LocalPackages/Subscription/Package.swift +++ b/LocalPackages/Subscription/Package.swift @@ -15,7 +15,7 @@ let package = Package( .package(path: "../Account"), .package(path: "../Purchase"), .package(path: "../SwiftUIExtensions"), - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "97.0.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "98.0.0"), ], targets: [ .target( diff --git a/LocalPackages/SwiftUIExtensions/Package.swift b/LocalPackages/SwiftUIExtensions/Package.swift index cc43577d0b..90a50b4864 100644 --- a/LocalPackages/SwiftUIExtensions/Package.swift +++ b/LocalPackages/SwiftUIExtensions/Package.swift @@ -13,7 +13,7 @@ let package = Package( ), ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "97.0.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "98.0.0"), ], targets: [ .target( diff --git a/LocalPackages/SyncUI/Package.swift b/LocalPackages/SyncUI/Package.swift index 49c6f30303..7ecccd197d 100644 --- a/LocalPackages/SyncUI/Package.swift +++ b/LocalPackages/SyncUI/Package.swift @@ -13,7 +13,7 @@ let package = Package( ], dependencies: [ .package(path: "../SwiftUIExtensions"), - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "97.0.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "98.0.0"), ], targets: [ .target( diff --git a/LocalPackages/SystemExtensionManager/Package.swift b/LocalPackages/SystemExtensionManager/Package.swift index e27bd650a8..58e8ba4070 100644 --- a/LocalPackages/SystemExtensionManager/Package.swift +++ b/LocalPackages/SystemExtensionManager/Package.swift @@ -16,7 +16,7 @@ let package = Package( ), ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "97.0.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "98.0.0"), ], targets: [ // Targets are the basic building blocks of a package, defining a module or a test suite. diff --git a/LocalPackages/XPCHelper/Package.swift b/LocalPackages/XPCHelper/Package.swift index 1424527204..dfdef8911f 100644 --- a/LocalPackages/XPCHelper/Package.swift +++ b/LocalPackages/XPCHelper/Package.swift @@ -30,7 +30,7 @@ let package = Package( .library(name: "XPCHelper", targets: ["XPCHelper"]), ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "97.0.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "98.0.0"), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite.