diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index 58947dc20f..388a3a24fa 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -13370,7 +13370,7 @@ repositoryURL = "https://github.com/duckduckgo/BrowserServicesKit"; requirement = { kind = exactVersion; - version = 178.0.0; + version = 179.0.0; }; }; 9FF521422BAA8FF300B9819B /* XCRemoteSwiftPackageReference "lottie-spm" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 2fa187fb00..03c1723785 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/duckduckgo/BrowserServicesKit", "state" : { - "revision" : "ebad3db46e09913ac4c0e0c62085dcb40a6d6253", - "version" : "178.0.0" + "revision" : "dfddead0e1e4735a021d3affb05b64fea561a807", + "version" : "179.0.0" } }, { diff --git a/DuckDuckGo/RemoteMessaging/RemoteMessagingConfigMatcherProvider.swift b/DuckDuckGo/RemoteMessaging/RemoteMessagingConfigMatcherProvider.swift index 5aac8a4f14..d6a11fdc05 100644 --- a/DuckDuckGo/RemoteMessaging/RemoteMessagingConfigMatcherProvider.swift +++ b/DuckDuckGo/RemoteMessaging/RemoteMessagingConfigMatcherProvider.swift @@ -124,6 +124,7 @@ final class RemoteMessagingConfigMatcherProvider: RemoteMessagingConfigMatcherPr } let dismissedMessageIds = store.fetchDismissedRemoteMessageIDs() + let shownMessageIds = store.fetchShownRemoteMessageIDs() #if APPSTORE let isInstalledMacAppStore = true @@ -155,6 +156,7 @@ final class RemoteMessagingConfigMatcherProvider: RemoteMessagingConfigMatcherPr isPrivacyProSubscriptionExpiring: isPrivacyProSubscriptionExpiring, isPrivacyProSubscriptionExpired: isPrivacyProSubscriptionExpired, dismissedMessageIds: dismissedMessageIds, + shownMessageIds: shownMessageIds, pinnedTabsCount: pinnedTabsManager.tabCollection.tabs.count, hasCustomHomePage: startupPreferencesPersistor().launchToCustomHomePage, isDuckPlayerOnboarded: duckPlayerPreferencesPersistor.youtubeOverlayAnyButtonPressed, diff --git a/LocalPackages/DataBrokerProtection/Package.swift b/LocalPackages/DataBrokerProtection/Package.swift index 6785bcd498..541a8544e5 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: "178.0.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "179.0.0"), .package(path: "../SwiftUIExtensions"), .package(path: "../XPCHelper"), ], diff --git a/LocalPackages/NetworkProtectionMac/Package.swift b/LocalPackages/NetworkProtectionMac/Package.swift index bb1cbb7e17..5447680251 100644 --- a/LocalPackages/NetworkProtectionMac/Package.swift +++ b/LocalPackages/NetworkProtectionMac/Package.swift @@ -32,7 +32,7 @@ let package = Package( .library(name: "VPNAppLauncher", targets: ["VPNAppLauncher"]), ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "178.0.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "179.0.0"), .package(url: "https://github.com/airbnb/lottie-spm", exact: "4.4.3"), .package(path: "../AppLauncher"), .package(path: "../UDSHelper"), diff --git a/LocalPackages/SubscriptionUI/Package.swift b/LocalPackages/SubscriptionUI/Package.swift index c87fc52740..6f04c63220 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: "178.0.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "179.0.0"), .package(path: "../SwiftUIExtensions") ], targets: [ diff --git a/UnitTests/RemoteMessaging/MockRemoteMessagingStore.swift b/UnitTests/RemoteMessaging/MockRemoteMessagingStore.swift index e1d9fd397f..46c967eeab 100644 --- a/UnitTests/RemoteMessaging/MockRemoteMessagingStore.swift +++ b/UnitTests/RemoteMessaging/MockRemoteMessagingStore.swift @@ -25,6 +25,7 @@ class MockRemoteMessagingStore: RemoteMessagingStoring { var fetchScheduledRemoteMessageCalls = 0 var fetchRemoteMessageCalls = 0 var hasShownRemoteMessageCalls = 0 + var fetchShownRemoteMessageIdsCalls = 0 var hasDismissedRemoteMessageCalls = 0 var dismissRemoteMessageCalls = 0 var fetchDismissedRemoteMessageIdsCalls = 0 @@ -74,6 +75,11 @@ class MockRemoteMessagingStore: RemoteMessagingStoring { return shownRemoteMessagesIDs.contains(id) } + func fetchShownRemoteMessageIDs() -> [String] { + fetchShownRemoteMessageIdsCalls += 1 + return shownRemoteMessagesIDs + } + func hasDismissedRemoteMessage(withID id: String) -> Bool { hasDismissedRemoteMessageCalls += 1 return dismissedRemoteMessagesIDs.contains(id)