diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index 386610fafa..d0bd747d55 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -1311,6 +1311,7 @@ 4B470EDE299C67270086EBDC /* AppTrackerEntity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppTrackerEntity.swift; sourceTree = ""; }; 4B470EE2299C6DD10086EBDC /* AppTrackingProtectionStoringModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppTrackingProtectionStoringModel.swift; sourceTree = ""; }; 4B52648A25F9613B00CB4C24 /* trackerData.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = trackerData.json; sourceTree = ""; }; + 4B5293BC2B14DA4C007860EB /* BrowserServicesKit */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = BrowserServicesKit; path = ../BrowserServicesKit; sourceTree = ""; }; 4B53648926718D0E001AA041 /* EmailWaitlist.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmailWaitlist.swift; sourceTree = ""; }; 4B5C46292AF2A6E6002A4432 /* VPNIntents.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPNIntents.swift; sourceTree = ""; }; 4B60AC96252EC07B00E8D219 /* fullscreenvideo.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; path = fullscreenvideo.js; sourceTree = ""; }; @@ -3639,6 +3640,7 @@ 84E341891E2F7EFB00BDBA6F = { isa = PBXGroup; children = ( + 4B5293BC2B14DA4C007860EB /* BrowserServicesKit */, EE3B98EB2A963515002F63A0 /* WidgetsExtensionAlpha.entitlements */, 6FB030C7234331B400A10DB9 /* Configuration.xcconfig */, EEB8FDB92A990AEE00EBEDCF /* Configuration-Alpha.xcconfig */, diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index b369637cf4..2b692a957e 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -10,15 +10,6 @@ "version": "3.0.0" } }, - { - "package": "BrowserServicesKit", - "repositoryURL": "https://github.com/DuckDuckGo/BrowserServicesKit", - "state": { - "branch": null, - "revision": "820203512819e81c4dd5ff0b53711d0010a8253c", - "version": "85.1.0" - } - }, { "package": "CocoaAsyncSocket", "repositoryURL": "https://github.com/robbiehanson/CocoaAsyncSocket", diff --git a/DuckDuckGo/RemoteMessaging.swift b/DuckDuckGo/RemoteMessaging.swift index ee6c3d897c..ed937e5ba8 100644 --- a/DuckDuckGo/RemoteMessaging.swift +++ b/DuckDuckGo/RemoteMessaging.swift @@ -149,17 +149,31 @@ struct RemoteMessaging { case .success(let statusResponse): os_log("Successfully fetched remote messages", log: .remoteMessaging, type: .debug) + let isNetworkProtectionWaitlistUser: Bool + let daysSinceNetworkProtectionEnabled: Int + +#if NETWORK_PROTECTION + // TODO: Use real values + isNetworkProtectionWaitlistUser = true + daysSinceNetworkProtectionEnabled = 5 +#else + isNetworkProtectionWaitlistUser = false + daysSinceNetworkProtectionEnabled = 0 +#endif + let remoteMessagingConfigMatcher = RemoteMessagingConfigMatcher( - appAttributeMatcher: AppAttributeMatcher(statisticsStore: statisticsStore, - variantManager: variantManager, - isInternalUser: AppDependencyProvider.shared.internalUserDecider.isInternalUser), - userAttributeMatcher: UserAttributeMatcher(statisticsStore: statisticsStore, - variantManager: variantManager, - bookmarksCount: bookmarksCount, - favoritesCount: favoritesCount, - appTheme: AppUserDefaults().currentThemeName.rawValue, - isWidgetInstalled: isWidgetInstalled), - dismissedMessageIds: remoteMessagingStore.fetchDismissedRemoteMessageIds() + appAttributeMatcher: AppAttributeMatcher(statisticsStore: statisticsStore, + variantManager: variantManager, + isInternalUser: AppDependencyProvider.shared.internalUserDecider.isInternalUser), + userAttributeMatcher: UserAttributeMatcher(statisticsStore: statisticsStore, + variantManager: variantManager, + bookmarksCount: bookmarksCount, + favoritesCount: favoritesCount, + appTheme: AppUserDefaults().currentThemeName.rawValue, + isWidgetInstalled: isWidgetInstalled, + isNetPWaitlistUser: isNetworkProtectionWaitlistUser, + daysSinceNetPEnabled: daysSinceNetworkProtectionEnabled), + dismissedMessageIds: remoteMessagingStore.fetchDismissedRemoteMessageIds() ) let processor = RemoteMessagingConfigProcessor(remoteMessagingConfigMatcher: remoteMessagingConfigMatcher)