From caeaa42b73803edd70943e924d9a3569df899a5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacek=20=C5=81yp?= Date: Mon, 25 Sep 2023 15:51:42 +0200 Subject: [PATCH 01/24] Update xcode version to 15 --- .xcode-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.xcode-version b/.xcode-version index 6dfe8b1298..94188a7483 100644 --- a/.xcode-version +++ b/.xcode-version @@ -1 +1 @@ -14.3.1 +15.0.0 From d4393dbf8587d86868b597194fe64dd95abd0610 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacek=20=C5=81yp?= Date: Mon, 25 Sep 2023 16:52:13 +0200 Subject: [PATCH 02/24] Fix version number --- .xcode-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.xcode-version b/.xcode-version index 94188a7483..fe6b09a7d1 100644 --- a/.xcode-version +++ b/.xcode-version @@ -1 +1 @@ -15.0.0 +15.0 From 0ab0b16852820d2f8372b7753393354c32fa8ea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacek=20=C5=81yp?= Date: Mon, 25 Sep 2023 17:02:56 +0200 Subject: [PATCH 03/24] Change simulator version --- .github/workflows/pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 3fc6578624..d503d50790 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -78,7 +78,7 @@ jobs: run: | set -o pipefail && xcodebuild test \ -scheme "DuckDuckGo" \ - -destination "platform=iOS Simulator,name=iPhone 14,OS=16.4" \ + -destination "platform=iOS Simulator,name=iPhone 15,OS=17.0" \ -derivedDataPath "DerivedData" \ DDG_SLOW_COMPILE_CHECK_THRESHOLD=250 \ | tee xcodebuild.log \ From ca41d3c522613844d7ad93a8d1c701fd8e2ac79e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacek=20=C5=81yp?= Date: Tue, 3 Oct 2023 13:27:57 +0200 Subject: [PATCH 04/24] Update resolved --- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index f903a9e2ac..10ef7c2de8 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -156,7 +156,7 @@ }, { "package": "TrackerRadarKit", - "repositoryURL": "https://github.com/duckduckgo/TrackerRadarKit.git", + "repositoryURL": "https://github.com/duckduckgo/TrackerRadarKit", "state": { "branch": null, "revision": "4684440d03304e7638a2c8086895367e90987463", From c8beaeb4cdb959649f300e23ae569d6500559161 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacek=20=C5=81yp?= Date: Tue, 3 Oct 2023 14:20:08 +0200 Subject: [PATCH 05/24] Remove tests that fail because URL initialization now escapes spaces --- DuckDuckGoTests/URLExtensionTests.swift | 9 --------- 1 file changed, 9 deletions(-) diff --git a/DuckDuckGoTests/URLExtensionTests.swift b/DuckDuckGoTests/URLExtensionTests.swift index 9b1c873443..8120b915db 100644 --- a/DuckDuckGoTests/URLExtensionTests.swift +++ b/DuckDuckGoTests/URLExtensionTests.swift @@ -107,15 +107,6 @@ class URLExtensionTests: XCTestCase { XCTAssertTrue(URL.isWebUrl("localhost/path")) } - func testWhenPathIsInvalidThenIsWebUrlIsFalse() { - XCTAssertFalse(URL.isWebUrl("http://test.com/pa th")) - XCTAssertFalse(URL.isWebUrl("http://121.33.2.11/pa th")) - XCTAssertFalse(URL.isWebUrl("http://localhost/pa th")) - XCTAssertFalse(URL.isWebUrl("test.com/pa th")) - XCTAssertFalse(URL.isWebUrl("121.33.2.11/pa th")) - XCTAssertFalse(URL.isWebUrl("localhost/pa th")) - } - func testWhenParamsAreValidThenIsWebUrlIsTrue() { XCTAssertTrue(URL.isWebUrl("http://test.com?s=dafas&d=342")) XCTAssertTrue(URL.isWebUrl("http://121.33.2.11?s=dafas&d=342")) From 74c605945b7fabb4fc56e07daf5a0f4e2eced8a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacek=20=C5=81yp?= Date: Tue, 3 Oct 2023 14:56:32 +0200 Subject: [PATCH 06/24] Increase timeouts to make tests pass --- ...NetworkProtectionStatusViewModelTests.swift | 2 +- DuckDuckGoTests/StatisticsLoaderTests.swift | 18 +++++++++--------- .../AutoconsentBackgroundTests.swift | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/DuckDuckGoTests/NetworkProtectionStatusViewModelTests.swift b/DuckDuckGoTests/NetworkProtectionStatusViewModelTests.swift index 18cb7e3ee4..2abc26a323 100644 --- a/DuckDuckGoTests/NetworkProtectionStatusViewModelTests.swift +++ b/DuckDuckGoTests/NetworkProtectionStatusViewModelTests.swift @@ -198,6 +198,6 @@ final class NetworkProtectionStatusViewModelTests: XCTestCase { condition() } let expectation = XCTNSPredicateExpectation(predicate: predicate, object: nil) - wait(for: [expectation], timeout: 5) + wait(for: [expectation], timeout: 20) } } diff --git a/DuckDuckGoTests/StatisticsLoaderTests.swift b/DuckDuckGoTests/StatisticsLoaderTests.swift index c6ab2c68df..671e038f50 100644 --- a/DuckDuckGoTests/StatisticsLoaderTests.swift +++ b/DuckDuckGoTests/StatisticsLoaderTests.swift @@ -53,7 +53,7 @@ class StatisticsLoaderTests: XCTestCase { expect.fulfill() } - waitForExpectations(timeout: 1, handler: nil) + waitForExpectations(timeout: 5, handler: nil) } func testWhenAppRefreshHasSuccessfulUpdateAtbRequestThenAppRetentionAtbUpdated() { @@ -69,7 +69,7 @@ class StatisticsLoaderTests: XCTestCase { expect.fulfill() } - waitForExpectations(timeout: 1, handler: nil) + waitForExpectations(timeout: 5, handler: nil) } func testWhenLoadHasSuccessfulAtbAndExtiRequestsThenStoreUpdatedWithVariant() { @@ -84,7 +84,7 @@ class StatisticsLoaderTests: XCTestCase { expect.fulfill() } - waitForExpectations(timeout: 1, handler: nil) + waitForExpectations(timeout: 5, handler: nil) } func testWhenLoadHasUnsuccessfulAtbThenStoreNotUpdated() { @@ -99,7 +99,7 @@ class StatisticsLoaderTests: XCTestCase { expect.fulfill() } - waitForExpectations(timeout: 1, handler: nil) + waitForExpectations(timeout: 5, handler: nil) } func testWhenLoadHasUnsuccessfulExtiThenStoreNotUpdated() { @@ -114,7 +114,7 @@ class StatisticsLoaderTests: XCTestCase { expect.fulfill() } - waitForExpectations(timeout: 1, handler: nil) + waitForExpectations(timeout: 5, handler: nil) } func testWhenSearchRefreshHasSuccessfulAtbRequestThenSearchRetentionAtbUpdated() { @@ -130,7 +130,7 @@ class StatisticsLoaderTests: XCTestCase { expect.fulfill() } - waitForExpectations(timeout: 1, handler: nil) + waitForExpectations(timeout: 5, handler: nil) } func testWhenAppRefreshHasSuccessfulAtbRequestThenAppRetentionAtbUpdated() { @@ -146,7 +146,7 @@ class StatisticsLoaderTests: XCTestCase { expect.fulfill() } - waitForExpectations(timeout: 1, handler: nil) + waitForExpectations(timeout: 5, handler: nil) } func testWhenSearchRefreshHasUnsuccessfulAtbRequestThenSearchRetentionAtbNotUpdated() { @@ -161,7 +161,7 @@ class StatisticsLoaderTests: XCTestCase { expect.fulfill() } - waitForExpectations(timeout: 1, handler: nil) + waitForExpectations(timeout: 5, handler: nil) } func testWhenAppRefreshHasUnsuccessfulAtbRequestThenSearchRetentionAtbNotUpdated() { @@ -176,7 +176,7 @@ class StatisticsLoaderTests: XCTestCase { expect.fulfill() } - waitForExpectations(timeout: 1, handler: nil) + waitForExpectations(timeout: 5, handler: nil) } func loadSuccessfulAtbStub() { diff --git a/IntegrationTests/AutoconsentBackgroundTests.swift b/IntegrationTests/AutoconsentBackgroundTests.swift index 0b4a7e29ce..f4e309eca9 100644 --- a/IntegrationTests/AutoconsentBackgroundTests.swift +++ b/IntegrationTests/AutoconsentBackgroundTests.swift @@ -75,7 +75,7 @@ final class AutoconsentBackgroundTests: XCTestCase { webview.navigationDelegate = navigationDelegate let url = Bundle(for: type(of: self)).url(forResource: "autoconsent-test-page", withExtension: "html")! webview.loadFileURL(url, allowingReadAccessTo: url.deletingLastPathComponent()) - waitForExpectations(timeout: 10) + waitForExpectations(timeout: 30) let expectation = expectation(description: "Async call") DispatchQueue.main.asyncAfter(deadline: .now() + 5) { @@ -92,7 +92,7 @@ final class AutoconsentBackgroundTests: XCTestCase { expectation.fulfill() }) } - waitForExpectations(timeout: 10) + waitForExpectations(timeout: 30) } @MainActor @@ -113,7 +113,7 @@ final class AutoconsentBackgroundTests: XCTestCase { webview.navigationDelegate = navigationDelegate let url = Bundle(for: type(of: self)).url(forResource: "autoconsent-test-page-banner", withExtension: "html")! webview.loadFileURL(url, allowingReadAccessTo: url.deletingLastPathComponent()) - waitForExpectations(timeout: 10) + waitForExpectations(timeout: 30) let expectation = expectation(description: "Async call") DispatchQueue.main.asyncAfter(deadline: .now() + 5) { @@ -130,7 +130,7 @@ final class AutoconsentBackgroundTests: XCTestCase { expectation.fulfill() }) } - waitForExpectations(timeout: 10) + waitForExpectations(timeout: 30) } } From 0b50210cc61f142dace5b9ab760de3ac8dfaf578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacek=20=C5=81yp?= Date: Wed, 4 Oct 2023 15:48:50 +0200 Subject: [PATCH 07/24] Try using Sonoma image runner --- .github/workflows/pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 9ccaaf598b..395e94cee6 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -41,7 +41,7 @@ jobs: name: Unit Tests - runs-on: macos-13 + runs-on: macos-14 timeout-minutes: 30 outputs: From 8962f3d1e809d29fa18a740e660d54cd7cfa3326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacek=20=C5=81yp?= Date: Wed, 4 Oct 2023 15:55:20 +0200 Subject: [PATCH 08/24] Try using latest runner --- .github/workflows/pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 395e94cee6..b5a3a7b82f 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -41,7 +41,7 @@ jobs: name: Unit Tests - runs-on: macos-14 + runs-on: macos-latest timeout-minutes: 30 outputs: From cb8d28dc0e28fc024503bc1b83df88ce0d463ce5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacek=20=C5=81yp?= Date: Wed, 4 Oct 2023 15:58:35 +0200 Subject: [PATCH 09/24] Back to macos 13 --- .github/workflows/pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index b5a3a7b82f..9ccaaf598b 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -41,7 +41,7 @@ jobs: name: Unit Tests - runs-on: macos-latest + runs-on: macos-13 timeout-minutes: 30 outputs: From e5c62a10cee61f427476616ae5317b5f2732e0f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacek=20=C5=81yp?= Date: Thu, 5 Oct 2023 08:12:06 +0200 Subject: [PATCH 10/24] Use M1 runner --- .github/workflows/pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 9ccaaf598b..18fdbe920b 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -41,7 +41,7 @@ jobs: name: Unit Tests - runs-on: macos-13 + runs-on: macos-13-xlarge timeout-minutes: 30 outputs: @@ -129,7 +129,7 @@ jobs: name: Make Release Build - runs-on: macos-13 + runs-on: macos-13-xlarge timeout-minutes: 30 steps: From ecbc14386f36b63869d85acfaa9247d2774ec466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacek=20=C5=81yp?= Date: Thu, 5 Oct 2023 20:44:50 +0200 Subject: [PATCH 11/24] Fix multiple warnings --- Core/BookmarksCachingSearch.swift | 4 +-- DuckDuckGo/AppDelegate.swift | 24 ++++++++++-------- DuckDuckGo/AuthenticationViewController.swift | 21 ++++++++-------- ...ofillLoginSettingsListViewController.swift | 3 ++- DuckDuckGo/FirewallManager.swift | 5 ++-- DuckDuckGo/IntervalSlider.swift | 1 + DuckDuckGo/TabSwitcherViewController.swift | 1 + .../TabsModelPersistenceExtension.swift | 2 +- .../ContentBlockingUpdatingTests.swift | 25 ++++++------------- DuckDuckGoTests/DaxDialogTests.swift | 7 +++--- 10 files changed, 46 insertions(+), 47 deletions(-) diff --git a/Core/BookmarksCachingSearch.swift b/Core/BookmarksCachingSearch.swift index 17b264b198..f41b88fe61 100644 --- a/Core/BookmarksCachingSearch.swift +++ b/Core/BookmarksCachingSearch.swift @@ -74,8 +74,8 @@ public class CoreDataBookmarksSearchStore: BookmarksSearchStore { #keyPath(BookmarkEntity.objectID)] context.perform { - let result = try? context.fetch(fetchRequest) as? [Dictionary] - + let result = try? context.fetch(fetchRequest) as? [[String: Any]] + let bookmarksAndFavorites = result?.compactMap(BookmarksCachingSearch.ScoredBookmark.init) ?? [] DispatchQueue.main.async { diff --git a/DuckDuckGo/AppDelegate.swift b/DuckDuckGo/AppDelegate.swift index 72298d240e..c17f13e4fd 100644 --- a/DuckDuckGo/AppDelegate.swift +++ b/DuckDuckGo/AppDelegate.swift @@ -409,10 +409,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate { } private func onApplicationLaunch(_ application: UIApplication) { - beginAuthentication() - initialiseBackgroundFetch(application) - applyAppearanceChanges() - refreshRemoteMessages() + Task { @MainActor in + await beginAuthentication() + initialiseBackgroundFetch(application) + applyAppearanceChanges() + refreshRemoteMessages() + } } private func applyAppearanceChanges() { @@ -428,10 +430,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate { func applicationWillEnterForeground(_ application: UIApplication) { ThemeManager.shared.updateUserInterfaceStyle() - beginAuthentication() - autoClear?.applicationWillMoveToForeground() - showKeyboardIfSettingOn = true - syncService.scheduler.resumeSyncQueue() + Task { @MainActor in + await beginAuthentication() + autoClear?.applicationWillMoveToForeground() + showKeyboardIfSettingOn = true + syncService.scheduler.resumeSyncQueue() + } } func applicationDidEnterBackground(_ application: UIApplication) { @@ -553,7 +557,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { window?.isHidden = true } - private func beginAuthentication() { + private func beginAuthentication() async { guard privacyStore.authenticationEnabled else { return } @@ -565,7 +569,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { return } - controller.beginAuthentication { [weak self] in + await controller.beginAuthentication { [weak self] in self?.removeOverlay() self?.showKeyboardOnLaunch() } diff --git a/DuckDuckGo/AuthenticationViewController.swift b/DuckDuckGo/AuthenticationViewController.swift index 6885a8e534..0538cb3ccb 100644 --- a/DuckDuckGo/AuthenticationViewController.swift +++ b/DuckDuckGo/AuthenticationViewController.swift @@ -50,28 +50,29 @@ class AuthenticationViewController: UIViewController { return .portrait } - public func beginAuthentication(completion: (() -> Void)?) { + public func beginAuthentication(completion: (() -> Void)?) async { self.completion = completion if authenticator.canAuthenticate() { - authenticate() + await authenticate() } else { onCouldNotAuthenticate() } } - private func authenticate() { + private func authenticate() async { hideUnlockInstructions() - authenticator.authenticate { (success, _) in - if success { - self.onAuthenticationSucceeded() - } else { - self.onAuthenticationFailed() - } + let success = await authenticator.authenticate(reason: UserText.appUnlock) + if success { + self.onAuthenticationSucceeded() + } else { + self.onAuthenticationFailed() } } @IBAction func onTap(_ sender: Any) { - authenticate() + Task { @MainActor in + await authenticate() + } } private func onCouldNotAuthenticate() { diff --git a/DuckDuckGo/AutofillLoginSettingsListViewController.swift b/DuckDuckGo/AutofillLoginSettingsListViewController.swift index 5207209fd5..dffd5fe6bc 100644 --- a/DuckDuckGo/AutofillLoginSettingsListViewController.swift +++ b/DuckDuckGo/AutofillLoginSettingsListViewController.swift @@ -287,6 +287,7 @@ final class AutofillLoginSettingsListViewController: UIViewController { // MARK: Subviews Setup + // swiftlint:disable:next function_body_length private func updateViewState() { switch viewModel.viewState { @@ -425,7 +426,7 @@ final class AutofillLoginSettingsListViewController: UIViewController { private func updateConstraintConstants() { let isIPhoneLandscape = traitCollection.containsTraits(in: UITraitCollection(verticalSizeClass: .compact)) if isIPhoneLandscape { - lockedViewBottomConstraint.constant = (view.frame.height / 2 - max(lockedView.frame.height, 120.0) / 2) + lockedViewBottomConstraint.constant = (view.frame.height / 2.0 - max(lockedView.frame.height, 120.0) / 2.0) } else { lockedViewBottomConstraint.constant = view.frame.height * 0.15 } diff --git a/DuckDuckGo/FirewallManager.swift b/DuckDuckGo/FirewallManager.swift index 2f3d482e9e..9b81497733 100644 --- a/DuckDuckGo/FirewallManager.swift +++ b/DuckDuckGo/FirewallManager.swift @@ -61,8 +61,8 @@ public class FirewallManager: FirewallManaging { public static let apptpLog: OSLog = OSLog(subsystem: Bundle.main.bundleIdentifier ?? AppVersion.shared.identifier, category: "AppTP") var manager: NETunnelProviderManager? - public var delegate: FirewallDelegate? - + public weak var delegate: FirewallDelegate? + public init() { NotificationCenter.default.addObserver(self, selector: #selector(statusDidChange), name: .NEVPNStatusDidChange, object: nil) @@ -161,6 +161,7 @@ public class FirewallManager: FirewallManaging { } } + // swiftlint:disable:next function_body_length public func setState(to enabled: Bool) async throws { let managers = try await NETunnelProviderManager.loadAllFromPreferences() manager = nil diff --git a/DuckDuckGo/IntervalSlider.swift b/DuckDuckGo/IntervalSlider.swift index 37ced4bea3..06a00d3089 100644 --- a/DuckDuckGo/IntervalSlider.swift +++ b/DuckDuckGo/IntervalSlider.swift @@ -64,6 +64,7 @@ class IntervalSlider: UISlider { } } + // swiftlint:disable:next unused_setter_value override var accessibilityValue: String? { get { let index = Int(self.value) diff --git a/DuckDuckGo/TabSwitcherViewController.swift b/DuckDuckGo/TabSwitcherViewController.swift index 29833eb944..e8788c4067 100644 --- a/DuckDuckGo/TabSwitcherViewController.swift +++ b/DuckDuckGo/TabSwitcherViewController.swift @@ -26,6 +26,7 @@ import Bookmarks import Persistence // swiftlint:disable file_length +// swiftlint:disable:next type_body_length class TabSwitcherViewController: UIViewController { struct Constants { diff --git a/DuckDuckGo/TabsModelPersistenceExtension.swift b/DuckDuckGo/TabsModelPersistenceExtension.swift index 184799ffe5..4e7267ae9c 100644 --- a/DuckDuckGo/TabsModelPersistenceExtension.swift +++ b/DuckDuckGo/TabsModelPersistenceExtension.swift @@ -27,7 +27,7 @@ extension TabsModel { public static func get() -> TabsModel? { guard let data = UserDefaults.app.object(forKey: Constants.key) as? Data else { return nil } - return try? NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(data) as? TabsModel + return try? NSKeyedUnarchiver.unarchivedObject(ofClass: TabsModel.self, from: data) } public static func clear() { diff --git a/DuckDuckGoTests/ContentBlockingUpdatingTests.swift b/DuckDuckGoTests/ContentBlockingUpdatingTests.swift index 414e3d62d6..300c94e174 100644 --- a/DuckDuckGoTests/ContentBlockingUpdatingTests.swift +++ b/DuckDuckGoTests/ContentBlockingUpdatingTests.swift @@ -24,7 +24,8 @@ import TrackerRadarKit import BrowserServicesKit @testable import DuckDuckGo -class ContentBlockingUpdatingTests: XCTestCase { +// swiftlint:disable:next type_body_length +final class ContentBlockingUpdatingTests: XCTestCase { let appSettings = AppSettingsMock() let configManager = PrivacyConfigurationManagerMock() let rulesManager = ContentBlockerRulesManagerMock() @@ -278,8 +279,7 @@ class ContentBlockingUpdatingTests: XCTestCase { static let tracker = KnownTracker(domain: "tracker.com", defaultAction: .block, - owner: KnownTracker.Owner(name: "Tracker Inc", - displayName: "Tracker Inc company"), + owner: KnownTracker.Owner(name: "Tracker Inc", displayName: "Tracker Inc company"), prevalence: 0.1, subdomains: nil, categories: nil, @@ -313,24 +313,16 @@ class ContentBlockingUpdatingTests: XCTestCase { } extension UserContentControllerNewContent { - func rules(withName name: String) -> WKContentRuleList? { - rulesUpdate.rules.first(where: { $0.name == name })?.rulesList - } + func rules(withName name: String) -> WKContentRuleList? { rulesUpdate.rules.first(where: { $0.name == name })?.rulesList } - var isValid: Bool { - return rules(withName: "test") != nil - } + var isValid: Bool { rules(withName: "test") != nil } } extension WKContentRuleList { private static var isSwizzled = false - private static let originalDealloc = { - class_getInstanceMethod(WKContentRuleList.self, NSSelectorFromString("dealloc"))! - }() - private static let swizzledDealloc = { - class_getInstanceMethod(WKContentRuleList.self, #selector(swizzled_dealloc))! - }() + private static let originalDealloc = { class_getInstanceMethod(WKContentRuleList.self, NSSelectorFromString("dealloc"))! }() + private static let swizzledDealloc = { class_getInstanceMethod(WKContentRuleList.self, #selector(swizzled_dealloc))! }() static func swizzleDealloc() { guard !self.isSwizzled else { return } @@ -345,7 +337,6 @@ extension WKContentRuleList { } @objc - func swizzled_dealloc() { - } + func swizzled_dealloc() { } } diff --git a/DuckDuckGoTests/DaxDialogTests.swift b/DuckDuckGoTests/DaxDialogTests.swift index 499bb731c3..727f21a99d 100644 --- a/DuckDuckGoTests/DaxDialogTests.swift +++ b/DuckDuckGoTests/DaxDialogTests.swift @@ -322,9 +322,8 @@ final class DaxDialog: XCTestCase { private func makePrivacyInfo(url: URL) -> PrivacyInfo { let protectionStatus = ProtectionStatus(unprotectedTemporary: false, enabledFeatures: [], allowlisted: false, denylisted: false) - let privacyInfo = PrivacyInfo(url: url, - parentEntity: entityProvider.entity(forHost: url.host!), - protectionStatus: protectionStatus) - return privacyInfo + return PrivacyInfo(url: url, + parentEntity: entityProvider.entity(forHost: url.host!), + protectionStatus: protectionStatus) } } From e179c1e48468bb1e2fb3d7ee71ea61d3488df884 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacek=20=C5=81yp?= Date: Thu, 5 Oct 2023 20:59:27 +0200 Subject: [PATCH 12/24] Silence Ignoring duplicate libraries -lc++ warnings --- DuckDuckGo.xcodeproj/project.pbxproj | 5 ++++- .../xcshareddata/xcschemes/AdhocDebug.xcscheme | 2 +- .../xcshareddata/xcschemes/AtbUITests.xcscheme | 2 +- DuckDuckGo.xcodeproj/xcshareddata/xcschemes/Core.xcscheme | 2 +- .../xcshareddata/xcschemes/DuckDuckGo-Alpha.xcscheme | 2 +- .../xcshareddata/xcschemes/DuckDuckGo.xcscheme | 2 +- .../xcshareddata/xcschemes/FingerprintingUITests.xcscheme | 2 +- .../xcshareddata/xcschemes/Instruments.xcscheme | 2 +- .../xcshareddata/xcschemes/OpenAction.xcscheme | 3 ++- .../xcshareddata/xcschemes/PacketTunnelProvider.xcscheme | 2 +- .../xcshareddata/xcschemes/PerformanceTests.xcscheme | 2 +- .../xcshareddata/xcschemes/ShareExtension.xcscheme | 3 ++- .../xcshareddata/xcschemes/UnitTests.xcscheme | 2 +- .../xcshareddata/xcschemes/WidgetsExtension.xcscheme | 2 +- DuckDuckGo/IntervalSlider.swift | 3 ++- 15 files changed, 21 insertions(+), 15 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index afbb089cfb..73d664090c 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -5485,7 +5485,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 1420; - LastUpgradeCheck = 1250; + LastUpgradeCheck = 1500; ORGANIZATIONNAME = DuckDuckGo; TargetAttributes = { 02025661298818B100E694E7 = { @@ -7853,6 +7853,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 14.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; + OTHER_LDFLAGS = "-ld_classic"; SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG APP_TRACKING_PROTECTION NETWORK_PROTECTION"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -7908,6 +7909,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 14.0; MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = "-ld_classic"; SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; @@ -8382,6 +8384,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 14.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; + OTHER_LDFLAGS = "-ld_classic"; SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG NETWORK_PROTECTION"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; diff --git a/DuckDuckGo.xcodeproj/xcshareddata/xcschemes/AdhocDebug.xcscheme b/DuckDuckGo.xcodeproj/xcshareddata/xcschemes/AdhocDebug.xcscheme index 48130163c1..5750e6f61e 100644 --- a/DuckDuckGo.xcodeproj/xcshareddata/xcschemes/AdhocDebug.xcscheme +++ b/DuckDuckGo.xcodeproj/xcshareddata/xcschemes/AdhocDebug.xcscheme @@ -1,6 +1,6 @@ diff --git a/DuckDuckGo.xcodeproj/xcshareddata/xcschemes/PacketTunnelProvider.xcscheme b/DuckDuckGo.xcodeproj/xcshareddata/xcschemes/PacketTunnelProvider.xcscheme index 2bc58099e7..d3236a4a96 100644 --- a/DuckDuckGo.xcodeproj/xcshareddata/xcschemes/PacketTunnelProvider.xcscheme +++ b/DuckDuckGo.xcodeproj/xcshareddata/xcschemes/PacketTunnelProvider.xcscheme @@ -1,6 +1,6 @@ diff --git a/DuckDuckGo.xcodeproj/xcshareddata/xcschemes/UnitTests.xcscheme b/DuckDuckGo.xcodeproj/xcshareddata/xcschemes/UnitTests.xcscheme index 50257b5ff7..3b2e04cc05 100644 --- a/DuckDuckGo.xcodeproj/xcshareddata/xcschemes/UnitTests.xcscheme +++ b/DuckDuckGo.xcodeproj/xcshareddata/xcschemes/UnitTests.xcscheme @@ -1,6 +1,6 @@ Date: Thu, 5 Oct 2023 22:07:45 +0200 Subject: [PATCH 13/24] Revert the unarchiver change --- DuckDuckGo/TabsModelPersistenceExtension.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DuckDuckGo/TabsModelPersistenceExtension.swift b/DuckDuckGo/TabsModelPersistenceExtension.swift index 4e7267ae9c..184799ffe5 100644 --- a/DuckDuckGo/TabsModelPersistenceExtension.swift +++ b/DuckDuckGo/TabsModelPersistenceExtension.swift @@ -27,7 +27,7 @@ extension TabsModel { public static func get() -> TabsModel? { guard let data = UserDefaults.app.object(forKey: Constants.key) as? Data else { return nil } - return try? NSKeyedUnarchiver.unarchivedObject(ofClass: TabsModel.self, from: data) + return try? NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(data) as? TabsModel } public static func clear() { From 69be459adb1d366c7278956b8d9a141ce73b3a22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacek=20=C5=81yp?= Date: Thu, 5 Oct 2023 22:12:21 +0200 Subject: [PATCH 14/24] Remove unneeded swiftlint corrections --- DuckDuckGo/AutofillLoginSettingsListViewController.swift | 1 - DuckDuckGo/FirewallManager.swift | 1 - DuckDuckGo/IntervalSlider.swift | 2 -- DuckDuckGo/TabSwitcherViewController.swift | 1 - DuckDuckGoTests/ContentBlockingUpdatingTests.swift | 1 - 5 files changed, 6 deletions(-) diff --git a/DuckDuckGo/AutofillLoginSettingsListViewController.swift b/DuckDuckGo/AutofillLoginSettingsListViewController.swift index dffd5fe6bc..b6597967fe 100644 --- a/DuckDuckGo/AutofillLoginSettingsListViewController.swift +++ b/DuckDuckGo/AutofillLoginSettingsListViewController.swift @@ -287,7 +287,6 @@ final class AutofillLoginSettingsListViewController: UIViewController { // MARK: Subviews Setup - // swiftlint:disable:next function_body_length private func updateViewState() { switch viewModel.viewState { diff --git a/DuckDuckGo/FirewallManager.swift b/DuckDuckGo/FirewallManager.swift index 9b81497733..6fb8e0a029 100644 --- a/DuckDuckGo/FirewallManager.swift +++ b/DuckDuckGo/FirewallManager.swift @@ -161,7 +161,6 @@ public class FirewallManager: FirewallManaging { } } - // swiftlint:disable:next function_body_length public func setState(to enabled: Bool) async throws { let managers = try await NETunnelProviderManager.loadAllFromPreferences() manager = nil diff --git a/DuckDuckGo/IntervalSlider.swift b/DuckDuckGo/IntervalSlider.swift index a1b339dfc9..37ced4bea3 100644 --- a/DuckDuckGo/IntervalSlider.swift +++ b/DuckDuckGo/IntervalSlider.swift @@ -64,7 +64,6 @@ class IntervalSlider: UISlider { } } - // swiftlint:disable unused_setter_value override var accessibilityValue: String? { get { let index = Int(self.value) @@ -73,6 +72,5 @@ class IntervalSlider: UISlider { } set {} } - // swiftlint:enable unused_setter_value } diff --git a/DuckDuckGo/TabSwitcherViewController.swift b/DuckDuckGo/TabSwitcherViewController.swift index e8788c4067..29833eb944 100644 --- a/DuckDuckGo/TabSwitcherViewController.swift +++ b/DuckDuckGo/TabSwitcherViewController.swift @@ -26,7 +26,6 @@ import Bookmarks import Persistence // swiftlint:disable file_length -// swiftlint:disable:next type_body_length class TabSwitcherViewController: UIViewController { struct Constants { diff --git a/DuckDuckGoTests/ContentBlockingUpdatingTests.swift b/DuckDuckGoTests/ContentBlockingUpdatingTests.swift index 300c94e174..6d9456d1b4 100644 --- a/DuckDuckGoTests/ContentBlockingUpdatingTests.swift +++ b/DuckDuckGoTests/ContentBlockingUpdatingTests.swift @@ -24,7 +24,6 @@ import TrackerRadarKit import BrowserServicesKit @testable import DuckDuckGo -// swiftlint:disable:next type_body_length final class ContentBlockingUpdatingTests: XCTestCase { let appSettings = AppSettingsMock() let configManager = PrivacyConfigurationManagerMock() From 5e8843b77c84a63f6b536f1f5b7b52a8409b2455 Mon Sep 17 00:00:00 2001 From: Sam Symons Date: Fri, 27 Oct 2023 14:46:35 +0200 Subject: [PATCH 15/24] Update Xcode version to 15.0.1. This is so that GitHub Actions uses the version of Xcode with the simulator launch fix. --- .xcode-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.xcode-version b/.xcode-version index fe6b09a7d1..2bbd2b4b42 100644 --- a/.xcode-version +++ b/.xcode-version @@ -1 +1 @@ -15.0 +15.0.1 From 73e4494ce8cfbdfefc0947da7c67cc866e35445d Mon Sep 17 00:00:00 2001 From: Sam Symons Date: Sun, 5 Nov 2023 13:09:50 -0800 Subject: [PATCH 16/24] Allow automatic provisioning on CI. --- .github/workflows/pr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index cea7282fb8..c79dc74464 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -81,6 +81,7 @@ jobs: -scheme "DuckDuckGo" \ -destination "platform=iOS Simulator,name=iPhone 15,OS=17.0" \ -derivedDataPath "DerivedData" \ + -allowProvisioningUpdates \ DDG_SLOW_COMPILE_CHECK_THRESHOLD=250 \ | tee xcodebuild.log \ | xcbeautify --report junit --report-path . --junit-report-filename unittests.xml From 05f9efe0fc95ee8ee2ee526041d1ce81ea35aeee Mon Sep 17 00:00:00 2001 From: Sam Symons Date: Sun, 5 Nov 2023 13:15:58 -0800 Subject: [PATCH 17/24] Remove automatic provisioning. --- .github/workflows/pr.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index c79dc74464..cea7282fb8 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -81,7 +81,6 @@ jobs: -scheme "DuckDuckGo" \ -destination "platform=iOS Simulator,name=iPhone 15,OS=17.0" \ -derivedDataPath "DerivedData" \ - -allowProvisioningUpdates \ DDG_SLOW_COMPILE_CHECK_THRESHOLD=250 \ | tee xcodebuild.log \ | xcbeautify --report junit --report-path . --junit-report-filename unittests.xml From df276c990b1eafd628752b30450797132842ef4a Mon Sep 17 00:00:00 2001 From: Sam Symons Date: Sun, 5 Nov 2023 13:39:07 -0800 Subject: [PATCH 18/24] Disable codesigning for test runs. --- .github/workflows/pr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index cea7282fb8..334fcb6e34 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -81,6 +81,7 @@ jobs: -scheme "DuckDuckGo" \ -destination "platform=iOS Simulator,name=iPhone 15,OS=17.0" \ -derivedDataPath "DerivedData" \ + CODE_SIGNING_ALLOWED=NO \ DDG_SLOW_COMPILE_CHECK_THRESHOLD=250 \ | tee xcodebuild.log \ | xcbeautify --report junit --report-path . --junit-report-filename unittests.xml From 440dd9f83c670cfa6a2ca158a7c0fd6101213764 Mon Sep 17 00:00:00 2001 From: Sam Symons Date: Sun, 5 Nov 2023 13:43:50 -0800 Subject: [PATCH 19/24] Undo the CODE_SIGNING_ALLOWED change. --- .github/workflows/pr.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 334fcb6e34..cea7282fb8 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -81,7 +81,6 @@ jobs: -scheme "DuckDuckGo" \ -destination "platform=iOS Simulator,name=iPhone 15,OS=17.0" \ -derivedDataPath "DerivedData" \ - CODE_SIGNING_ALLOWED=NO \ DDG_SLOW_COMPILE_CHECK_THRESHOLD=250 \ | tee xcodebuild.log \ | xcbeautify --report junit --report-path . --junit-report-filename unittests.xml From 713c955c7f66d960759dc9334282a1534374b346 Mon Sep 17 00:00:00 2001 From: Sam Symons Date: Thu, 16 Nov 2023 19:40:45 -0800 Subject: [PATCH 20/24] Try using more generic certificates. --- DuckDuckGo.xcodeproj/project.pbxproj | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index 6ff1bd6c6f..858d954b10 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -7800,7 +7800,6 @@ CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_ENTITLEMENTS = PacketTunnelProvider/PacketTunnelProvider.entitlements; - CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 0; DEVELOPMENT_TEAM = HKE973VLUW; @@ -7928,8 +7927,6 @@ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 0; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8010,7 +8007,6 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -8073,7 +8069,6 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; @@ -8104,8 +8099,6 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = DuckDuckGo/DuckDuckGo.entitlements; - CODE_SIGN_IDENTITY = "iPhone Distribution"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 0; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_ASSET_PATHS = ""; @@ -8191,8 +8184,6 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_ENTITLEMENTS = Widgets/WidgetsExtension.entitlements; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 0; DEAD_CODE_STRIPPING = NO; @@ -8260,8 +8251,6 @@ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 0; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8378,7 +8367,6 @@ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8541,7 +8529,6 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; From 5aaf30d41361c3a000f71327bb894e45563662a8 Mon Sep 17 00:00:00 2001 From: Sam Symons Date: Thu, 16 Nov 2023 19:49:01 -0800 Subject: [PATCH 21/24] Revert "Try using more generic certificates." This reverts commit 713c955c7f66d960759dc9334282a1534374b346. --- DuckDuckGo.xcodeproj/project.pbxproj | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index 858d954b10..6ff1bd6c6f 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -7800,6 +7800,7 @@ CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_ENTITLEMENTS = PacketTunnelProvider/PacketTunnelProvider.entitlements; + CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 0; DEVELOPMENT_TEAM = HKE973VLUW; @@ -7927,6 +7928,8 @@ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 0; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8007,6 +8010,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -8069,6 +8073,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; @@ -8099,6 +8104,8 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = DuckDuckGo/DuckDuckGo.entitlements; + CODE_SIGN_IDENTITY = "iPhone Distribution"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 0; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_ASSET_PATHS = ""; @@ -8184,6 +8191,8 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_ENTITLEMENTS = Widgets/WidgetsExtension.entitlements; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 0; DEAD_CODE_STRIPPING = NO; @@ -8251,6 +8260,8 @@ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 0; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8367,6 +8378,7 @@ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8529,6 +8541,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; From a1a10360e8c9089a70bfbcba7fc87007ec418063 Mon Sep 17 00:00:00 2001 From: Sam Symons Date: Thu, 7 Dec 2023 20:28:43 -0800 Subject: [PATCH 22/24] Use 17.0.1 simulators. --- .github/workflows/pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 0c97d4a329..3d6f444812 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -79,7 +79,7 @@ jobs: run: | set -o pipefail && xcodebuild test \ -scheme "DuckDuckGo" \ - -destination "platform=iOS Simulator,name=iPhone 15,OS=17.0" \ + -destination "platform=iOS Simulator,name=iPhone 15,OS=17.0.1" \ -derivedDataPath "DerivedData" \ DDG_SLOW_COMPILE_CHECK_THRESHOLD=250 \ | tee xcodebuild.log \ From c23d0955cae42c7cdfa98a5cb5df1135932ab9ff Mon Sep 17 00:00:00 2001 From: Sam Symons Date: Fri, 15 Dec 2023 07:51:25 -0800 Subject: [PATCH 23/24] Upgrade to Xcode 15.1. --- .github/workflows/alpha.yml | 2 +- .github/workflows/pr.yml | 2 +- .xcode-version | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/alpha.yml b/.github/workflows/alpha.yml index 5d39e3648f..1696288b02 100644 --- a/.github/workflows/alpha.yml +++ b/.github/workflows/alpha.yml @@ -76,7 +76,7 @@ jobs: # Using Xcode 15 as the alpha build uses iOS 17 APIs - name: Select Xcode - run: sudo xcode-select -s /Applications/Xcode_15.0.1.app/Contents/Developer + run: sudo xcode-select -s /Applications/Xcode_$(<.xcode-version)/Contents/Developer - name: Prepare fastlane run: bundle install diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 3d6f444812..b8833eafaf 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -79,7 +79,7 @@ jobs: run: | set -o pipefail && xcodebuild test \ -scheme "DuckDuckGo" \ - -destination "platform=iOS Simulator,name=iPhone 15,OS=17.0.1" \ + -destination "platform=iOS Simulator,name=iPhone 15,OS=17.2" \ -derivedDataPath "DerivedData" \ DDG_SLOW_COMPILE_CHECK_THRESHOLD=250 \ | tee xcodebuild.log \ diff --git a/.xcode-version b/.xcode-version index 2bbd2b4b42..adbc6d2b1b 100644 --- a/.xcode-version +++ b/.xcode-version @@ -1 +1 @@ -15.0.1 +15.1 From 84e93438dbb5f6969b485bf3b02fd99f9f5f1c7c Mon Sep 17 00:00:00 2001 From: Sam Symons Date: Sun, 7 Jan 2024 16:32:29 -0800 Subject: [PATCH 24/24] Fix alpha Xcode version format. --- .github/workflows/alpha.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/alpha.yml b/.github/workflows/alpha.yml index fba72fe3a5..1b7213e6b0 100644 --- a/.github/workflows/alpha.yml +++ b/.github/workflows/alpha.yml @@ -77,7 +77,7 @@ jobs: # Using Xcode 15 as the alpha build uses iOS 17 APIs - name: Select Xcode - run: sudo xcode-select -s /Applications/Xcode_$(<.xcode-version)/Contents/Developer + run: sudo xcode-select -s /Applications/Xcode_$(<.xcode-version).app/Contents/Developer - name: Prepare fastlane run: bundle install