Skip to content

Commit

Permalink
Merge branch 'develop' into sam/disable-apptp-database-initialization
Browse files Browse the repository at this point in the history
* develop:
  re-enable keyboard shortcuts (#2132)
  fix favorite launch with keyboard bug (#2131)
  Fix syncing empty favorites folders (#2121)
  kill variant when receiving atb update (#2130)
  Adding 'protectionsState' to breakage form submission (#2120)
  Release 7.96.0 (#2128)
  Update remote messaging production url (#2124)
  Alert user about abnormal app conditions (#2110)
  Add e2e test for email protection deep-links (#2123)
  Update to config v4 (#2114)
  Release 7.95.0 (#2122)
  Add toggling of NetP Notifications to iOS (#2112)
  Fix for deeplink crash when preparing webview preview (#2116)
  Integrates the latest DBP changes in BSK (#2108)
  Switch to next phase of new experiment for UA (#2118)
  • Loading branch information
samsymons committed Nov 8, 2023
2 parents 3fe8ab2 + 81e555e commit a8e8d2c
Show file tree
Hide file tree
Showing 159 changed files with 14,386 additions and 2,275 deletions.
24 changes: 24 additions & 0 deletions .maestro/release_tests/emailprotection.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
appId: com.duckduckgo.mobile.ios
tags:
- release

---

- clearState
- launchApp
- runFlow:
when:
visible:
text: "Let’s Do It!"
index: 0
file: ../shared/onboarding.yaml

- tapOn: Settings
- scroll
- scroll
- assertVisible: Email Protection
- tapOn: Email Protection, Block email trackers and hide your address
- assertVisible:
id: searchEntry
- assertVisible: https://duckduckgo.com/email/
- assertVisible: Email privacy, simplified.
2 changes: 1 addition & 1 deletion Configuration/Version.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
MARKETING_VERSION = 7.94.0
MARKETING_VERSION = 7.96.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 = "\"34b6806ec63c85144adb71af7e899b40\""
public static let embeddedDataSHA = "167fdf9054fd7a0f8b2e9b5f84a8dae7d569752b0278d82b6a394380531f61e5"
public static let embeddedDataETag = "\"39c652b21aa330463726faf240e03445\""
public static let embeddedDataSHA = "b19c28e816008ace47a9e3e58f74eef6558b5cbdcd7d79d098d7d2e56d686075"
}

public var embeddedDataEtag: String {
Expand Down
3 changes: 2 additions & 1 deletion Core/AppURLs.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@ public extension URL {

static let autocomplete = URL(string: "\(base)/ac/")!
static let emailProtection = URL(string: "\(base)/email")!
static let emailProtectionSignUp = URL(string: "\(base)/email/start-incontext")!
static let emailProtectionQuickLink = URL(string: AppDeepLinkSchemes.quickLink.appending("\(ddg.host!)/email"))!
static let aboutLink = URL(string: AppDeepLinkSchemes.quickLink.appending("\(ddg.host!)/about"))!

static let surrogates = URL(string: "\(staticBase)/surrogates.txt")!

// The following URLs shall match the ones in update_embedded.sh.
// Danger checks that the URLs match on every PR. If the code changes, the regex that Danger uses may need an update.
static let privacyConfig = URL(string: "\(staticBase)/trackerblocking/config/v3/ios-config.json")!
static let privacyConfig = URL(string: "\(staticBase)/trackerblocking/config/v4/ios-config.json")!
static let trackerDataSet = URL(string: "\(staticBase)/trackerblocking/v5/current/ios-tds.json")!
static let bloomFilter = URL(string: "\(staticBase)/https/https-mobile-v2-bloom.bin")!
static let bloomFilterSpec = URL(string: "\(staticBase)/https/https-mobile-v2-bloom-spec.json")!
Expand Down
8 changes: 7 additions & 1 deletion Core/ContentBlocking.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import BrowserServicesKit
import Combine
import Common


public final class ContentBlocking {
public static let shared = ContentBlocking()

Expand All @@ -34,6 +35,11 @@ public final class ContentBlocking {
private let exceptionsSource: DefaultContentBlockerRulesExceptionsSource
private let lastCompiledRulesStore: AppLastCompiledRulesStore

public var onCriticalError: (() -> Void)? {
didSet {
contentBlockingManager.onCriticalError = onCriticalError
}
}

private init(privacyConfigurationManager: PrivacyConfigurationManaging? = nil) {
let internalUserDecider = DefaultInternalUserDecider(store: InternalUserStore())
Expand Down Expand Up @@ -128,7 +134,7 @@ public final class ContentBlocking {
}

}

public func makeAdClickAttributionDetection(tld: TLD) -> AdClickAttributionDetection {
AdClickAttributionDetection(feature: adClickAttribution,
tld: tld,
Expand Down
1 change: 0 additions & 1 deletion Core/Core.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@


#import <UIKit/UIKit.h>
#import "BloomFilterWrapper.h"


//! Project version number for Core.
Expand Down
7 changes: 5 additions & 2 deletions Core/DefaultVariantManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ extension FeatureName {
// public static let experimentalFeature = FeatureName(rawValue: "experimentalFeature")

public static let fixedUserAgent = FeatureName(rawValue: "fixedUserAgent")
public static let closestUserAgent = FeatureName(rawValue: "closestUserAgent")
}

public struct VariantIOS: Variant {
Expand Down Expand Up @@ -61,8 +62,10 @@ public struct VariantIOS: Variant {
VariantIOS(name: "sc", weight: doNotAllocate, isIncluded: When.always, features: []),
VariantIOS(name: "sd", weight: doNotAllocate, isIncluded: When.always, features: []),
VariantIOS(name: "se", weight: doNotAllocate, isIncluded: When.always, features: []),
VariantIOS(name: "me", weight: 1, isIncluded: When.always, features: []),
VariantIOS(name: "mf", weight: 1, isIncluded: When.always, features: [.fixedUserAgent]),
VariantIOS(name: "me", weight: doNotAllocate, isIncluded: When.always, features: []),
VariantIOS(name: "mf", weight: doNotAllocate, isIncluded: When.always, features: []),
VariantIOS(name: "mg", weight: 1, isIncluded: When.always, features: [.fixedUserAgent]),
VariantIOS(name: "mh", weight: 1, isIncluded: When.always, features: [.closestUserAgent]),
returningUser
]

Expand Down
1 change: 1 addition & 0 deletions Core/StatisticsLoader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ public class StatisticsLoader {
public func storeUpdateVersionIfPresent(_ atb: Atb) {
if let updateVersion = atb.updateVersion {
statisticsStore.atb = updateVersion
statisticsStore.variant = nil
returnUserMeasurement.updateStoredATB(atb)
}
}
Expand Down
2 changes: 2 additions & 0 deletions Core/UserAgentManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ struct UserAgent {

if DefaultVariantManager().isSupported(feature: .fixedUserAgent) {
return ddgFixedLogic(forUrl: url, isDesktop: isDesktop, privacyConfig: privacyConfig)
} else if DefaultVariantManager().isSupported(feature: .closestUserAgent) {
return closestLogic(forUrl: url, isDesktop: isDesktop, privacyConfig: privacyConfig)
}

switch defaultPolicy(forConfig: privacyConfig) {
Expand Down
34 changes: 34 additions & 0 deletions Core/UserDefaults+NetworkProtection.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
//
// UserDefaults+NetworkProtection.swift
// DuckDuckGo
//
// Copyright © 2023 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.
//

#if NETWORK_PROTECTION

import Foundation

public extension UserDefaults {
static var networkProtectionGroupDefaults: UserDefaults {
let suiteName = "\(Global.groupIdPrefix).netp"
guard let defaults = UserDefaults(suiteName: suiteName) else {
fatalError("Failed to create netP UserDefaults")
}
return defaults
}
}

#endif
Loading

0 comments on commit a8e8d2c

Please sign in to comment.