Skip to content

Commit

Permalink
Merge branch 'main' into sam/increase-deployment-target-to-ios-15
Browse files Browse the repository at this point in the history
* main:
  Fire a pixel when removing the VPN configuration (#3014)
  Release 7.127.0-0 (#3020)
  point to BSK branch (#3016)
  [DuckPlayer] - 3. URL management & FE comms (#3007)
  Bump BSK version (#3011)
  New Tab Page layout and base elements (#3008)
  Remove Privacy Pro from device once expired account is deleted (#3009)
  Improvements to subscription settings (#2959)
  Toggle reports limiter (#3005)
  Duck Player info Modal (#3006)
  Silence tunnel startup noise with no access token available (#2993)
  In case Pending Deletion flag is nil, populate it with 'false' value (#2997)
  VPN uninstall not stopping agent in App Store build (#2999)
  Update VPN metadata to include entitlement (#3002)
  • Loading branch information
samsymons committed Jul 1, 2024
2 parents e0bf9ed + 53a405f commit d304e8d
Show file tree
Hide file tree
Showing 69 changed files with 1,981 additions and 542 deletions.
2 changes: 1 addition & 1 deletion Configuration/Version.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
MARKETING_VERSION = 7.126.0
MARKETING_VERSION = 7.127.0
4 changes: 2 additions & 2 deletions Core/AppPrivacyConfigurationDataProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import BrowserServicesKit
final public class AppPrivacyConfigurationDataProvider: EmbeddedDataProvider {

public struct Constants {
public static let embeddedDataETag = "\"6e864c9ba3042d9fd90f2e4f9713ef06\""
public static let embeddedDataSHA = "59fc3aa71802c502fbe5042d03da8c1007f4f68014405386fc4c2fa267729319"
public static let embeddedDataETag = "\"8d80c53fc5696854e2ef43bcb28089a1\""
public static let embeddedDataSHA = "cdc42bdffa7ab5478ca80febf325cf689148cd19a68153e0a2cafed888b1d1ce"
}

public var embeddedDataEtag: String {
Expand Down
83 changes: 83 additions & 0 deletions Core/BookmarksStateRepair.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
//
// BookmarksStateRepair.swift
// DuckDuckGo
//
// Copyright © 2024 DuckDuckGo. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

import Foundation
import CoreData
import Bookmarks
import Persistence

public class BookmarksStateRepair {

enum Constants {
static let pendingDeletionRepaired = "stateRepair_pendingDeletionRepaired"
}

public enum RepairStatus: Equatable {
case alreadyPerformed
case noBrokenData
case dataRepaired
case repairError(Error)

public static func == (lhs: BookmarksStateRepair.RepairStatus, rhs: BookmarksStateRepair.RepairStatus) -> Bool {
switch (lhs, rhs) {
case (.alreadyPerformed, .alreadyPerformed), (.noBrokenData, .noBrokenData), (.dataRepaired, .dataRepaired), (.repairError, .repairError):
return true
default:
return false
}
}
}

let keyValueStore: KeyValueStoring

public init(keyValueStore: KeyValueStoring) {
self.keyValueStore = keyValueStore
}

public func validateAndRepairPendingDeletionState(in context: NSManagedObjectContext) -> RepairStatus {

guard keyValueStore.object(forKey: Constants.pendingDeletionRepaired) == nil else {
return .alreadyPerformed
}

do {
let fr = BookmarkEntity.fetchRequest()
fr.predicate = NSPredicate(format: "%K == nil", #keyPath(BookmarkEntity.isPendingDeletion))

let result = try context.fetch(fr)

if !result.isEmpty {
for obj in result {
obj.setValue(false, forKey: #keyPath(BookmarkEntity.isPendingDeletion))
}

try context.save()

keyValueStore.set(true, forKey: Constants.pendingDeletionRepaired)
return .dataRepaired
} else {
keyValueStore.set(true, forKey: Constants.pendingDeletionRepaired)
return .noBrokenData
}
} catch {
return .repairError(error)
}
}

}
20 changes: 16 additions & 4 deletions Core/PixelEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ extension Pixel {
case networkProtectionControllerStartFailure

case networkProtectionTunnelStartAttempt
case networkProtectionTunnelStartAttemptOnDemandWithoutAccessToken
case networkProtectionTunnelStartSuccess
case networkProtectionTunnelStartFailure

Expand All @@ -338,7 +339,7 @@ extension Pixel {

case networkProtectionTunnelFailureDetected
case networkProtectionTunnelFailureRecovered

case networkProtectionLatency(quality: NetworkProtectionLatencyMonitor.ConnectionQuality)
case networkProtectionLatencyError

Expand Down Expand Up @@ -415,6 +416,9 @@ extension Pixel {
case networkProtectionDNSUpdateCustom
case networkProtectionDNSUpdateDefault

case networkProtectionVPNConfigurationRemoved
case networkProtectionVPNConfigurationRemovalFailed

// MARK: remote messaging pixels

case remoteMessageShown
Expand Down Expand Up @@ -504,7 +508,10 @@ extension Pixel {
case debugBookmarksStructureLost
case debugBookmarksInvalidRoots
case debugBookmarksValidationFailed


case debugBookmarksPendingDeletionFixed
case debugBookmarksPendingDeletionRepairError

case debugCannotClearObservationsDatabase
case debugWebsiteDataStoresNotClearedMultiple
case debugWebsiteDataStoresNotClearedOne
Expand Down Expand Up @@ -643,7 +650,6 @@ extension Pixel {
case privacyProRestoreAfterPurchaseAttempt
case privacyProSubscriptionActivated
case privacyProWelcomeAddDevice
case privacyProSettingsAddDevice
case privacyProAddDeviceEnterEmail
case privacyProWelcomeVPN
case privacyProWelcomePersonalInformationRemoval
Expand Down Expand Up @@ -1020,6 +1026,7 @@ extension Pixel.Event {
case .networkProtectionControllerStartSuccess: return "m_netp_controller_start_success"
case .networkProtectionControllerStartFailure: return "m_netp_controller_start_failure"
case .networkProtectionTunnelStartAttempt: return "m_netp_tunnel_start_attempt"
case .networkProtectionTunnelStartAttemptOnDemandWithoutAccessToken: return "m_netp_tunnel_start_attempt_on_demand_without_access_token"
case .networkProtectionTunnelStartSuccess: return "m_netp_tunnel_start_success"
case .networkProtectionTunnelStartFailure: return "m_netp_tunnel_start_failure"
case .networkProtectionTunnelStopAttempt: return "m_netp_tunnel_stop_attempt"
Expand Down Expand Up @@ -1098,6 +1105,9 @@ extension Pixel.Event {
case .networkProtectionDNSUpdateCustom: return "m_netp_ev_update_dns_custom"
case .networkProtectionDNSUpdateDefault: return "m_netp_ev_update_dns_default"

case .networkProtectionVPNConfigurationRemoved: return "m_netp_vpn_configuration_removed"
case .networkProtectionVPNConfigurationRemovalFailed: return "m_netp_vpn_configuration_removal_failed"

// MARK: remote messaging pixels

case .remoteMessageShown: return "m_remote_message_shown"
Expand Down Expand Up @@ -1183,6 +1193,9 @@ extension Pixel.Event {
case .debugBookmarksInvalidRoots: return "m_d_bookmarks_invalid_roots"
case .debugBookmarksValidationFailed: return "m_d_bookmarks_validation_failed"

case .debugBookmarksPendingDeletionFixed: return "m_debug_bookmarks_pending_deletion_fixed"
case .debugBookmarksPendingDeletionRepairError: return "m_debug_bookmarks_pending_deletion_repair_error"

case .debugCannotClearObservationsDatabase: return "m_d_cannot_clear_observations_database"
case .debugWebsiteDataStoresNotClearedMultiple: return "m_d_wkwebsitedatastoresnotcleared_multiple"
case .debugWebsiteDataStoresNotClearedOne: return "m_d_wkwebsitedatastoresnotcleared_one"
Expand Down Expand Up @@ -1340,7 +1353,6 @@ extension Pixel.Event {
case .privacyProRestoreAfterPurchaseAttempt: return "m_privacy-pro_app_subscription-restore-after-purchase-attempt_success"
case .privacyProSubscriptionActivated: return "m_privacy-pro_app_subscription_activated_u"
case .privacyProWelcomeAddDevice: return "m_privacy-pro_welcome_add-device_click_u"
case .privacyProSettingsAddDevice: return "m_privacy-pro_settings_add-device_click"
case .privacyProAddDeviceEnterEmail: return "m_privacy-pro_add-device_enter-email_click"
case .privacyProWelcomeVPN: return "m_privacy-pro_welcome_vpn_click_u"
case .privacyProWelcomePersonalInformationRemoval: return "m_privacy-pro_welcome_personal-information-removal_click_u"
Expand Down
118 changes: 109 additions & 9 deletions Core/ios-config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"readme": "https://github.com/duckduckgo/privacy-configuration",
"version": 1719225510541,
"version": 1719853254811,
"features": {
"adClickAttribution": {
"readme": "https://help.duckduckgo.com/duckduckgo-help-pages/privacy/web-tracking-protections/#3rd-party-tracker-loading-protection",
Expand Down Expand Up @@ -300,6 +300,9 @@
{
"domain": "malmostadsteater.se"
},
{
"domain": "hertz.co.uk"
},
{
"domain": "hertz.com"
},
Expand Down Expand Up @@ -353,7 +356,7 @@
}
}
},
"hash": "63f99d701b33267410e99d637e3f7778"
"hash": "c47027bc9d235b909d868f5ffa97d3c9"
},
"autofill": {
"exceptions": [
Expand Down Expand Up @@ -1010,6 +1013,72 @@
{
"domain": "pocketbook.digital"
},
{
"domain": "vinted.at"
},
{
"domain": "vinted.be"
},
{
"domain": "vinted.com"
},
{
"domain": "vinted.co.uk"
},
{
"domain": "vinted.cz"
},
{
"domain": "vinted.de"
},
{
"domain": "vinted.dk"
},
{
"domain": "vinted.es"
},
{
"domain": "vinted.fi"
},
{
"domain": "vinted.fr"
},
{
"domain": "vinted.gr"
},
{
"domain": "vinted.hr"
},
{
"domain": "vinted.hu"
},
{
"domain": "vinted.it"
},
{
"domain": "vinted.lt"
},
{
"domain": "vinted.lu"
},
{
"domain": "vinted.nl"
},
{
"domain": "vinted.pl"
},
{
"domain": "vinted.pt"
},
{
"domain": "vinted.ro"
},
{
"domain": "vinted.se"
},
{
"domain": "vinted.sk"
},
{
"domain": "marvel.com"
},
Expand All @@ -1035,7 +1104,7 @@
}
},
"state": "disabled",
"hash": "4104bd45b436c084ff8fd0297883d40e"
"hash": "1d9a8170b92ba9902d28fad82713a403"
},
"clickToPlay": {
"exceptions": [
Expand Down Expand Up @@ -1290,11 +1359,6 @@
"state": "disabled",
"hash": "314df3f87ca501a86eb1d04db8bf7bbc"
},
"dummyWebMessageListener": {
"exceptions": [],
"state": "disabled",
"hash": "728493ef7a1488e4781656d3f9db84aa"
},
"elementHiding": {
"exceptions": [
{
Expand Down Expand Up @@ -2455,6 +2519,15 @@
}
]
},
{
"domain": "eporner.com",
"rules": [
{
"selector": "#admobiletop",
"type": "hide"
}
]
},
{
"domain": "essentiallysports.com",
"rules": [
Expand Down Expand Up @@ -4486,7 +4559,7 @@
]
},
"state": "enabled",
"hash": "85bebc8a4c01285c2cfb97032a0610bb"
"hash": "573f3bc0a0f15e5dc7d561034e7a082d"
},
"exceptionHandler": {
"exceptions": [
Expand Down Expand Up @@ -5239,6 +5312,11 @@
"state": "disabled",
"hash": "3c850040d1c9b3e06841b1491c5d2940"
},
"remoteMessaging": {
"state": "enabled",
"exceptions": [],
"hash": "697382e31649d84b01166f1dc6f790d6"
},
"requestFilterer": {
"state": "disabled",
"exceptions": [
Expand Down Expand Up @@ -5313,6 +5391,18 @@
"minSupportedVersion": "7.104.0",
"hash": "d7dca6ee484eadebb5133e3f15fd9f41"
},
"toggleReports": {
"state": "enabled",
"exceptions": [],
"settings": {
"dismissLogicEnabled": true,
"dismissInterval": 172800,
"promptLimitLogicEnabled": true,
"promptInterval": 172800,
"maxPromptCount": 3
},
"hash": "a05b4413a3745762c46ec89aa5037693"
},
"trackerAllowlist": {
"state": "enabled",
"settings": {
Expand Down Expand Up @@ -8746,6 +8836,16 @@
},
"hash": "25d935f0276cd0d81fc6f25811f7cb36"
},
"webViewBlobDownload": {
"exceptions": [],
"state": "disabled",
"hash": "728493ef7a1488e4781656d3f9db84aa"
},
"windowsExternalPreviewReleases": {
"exceptions": [],
"state": "disabled",
"hash": "728493ef7a1488e4781656d3f9db84aa"
},
"windowsPermissionUsage": {
"exceptions": [],
"state": "disabled",
Expand Down
Loading

0 comments on commit d304e8d

Please sign in to comment.