From 9ed929bb8ef98fb3a5c9b249c0c47f7ecaa2cc6d Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Mon, 4 Nov 2024 17:46:24 +0100 Subject: [PATCH 1/4] Point to BSK branch and handle new error --- Core/PixelEvent.swift | 2 ++ Core/SyncErrorHandler.swift | 2 ++ DuckDuckGo.xcodeproj/project.pbxproj | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Core/PixelEvent.swift b/Core/PixelEvent.swift index f300d9febc..58518bbe63 100644 --- a/Core/PixelEvent.swift +++ b/Core/PixelEvent.swift @@ -624,6 +624,7 @@ extension Pixel { case syncRemoveDeviceError case syncDeleteAccountError case syncLoginExistingAccountError + case syncSecureStorageReadError case syncGetOtherDevices case syncGetOtherDevicesCopy @@ -1432,6 +1433,7 @@ extension Pixel.Event { case .syncRemoveDeviceError: return "m_d_sync_remove_device_error" case .syncDeleteAccountError: return "m_d_sync_delete_account_error" case .syncLoginExistingAccountError: return "m_d_sync_login_existing_account_error" + case .syncSecureStorageReadError: return "m_d_sync_secure_storage_error" case .syncGetOtherDevices: return "sync_get_other_devices" case .syncGetOtherDevicesCopy: return "sync_get_other_devices_copy" diff --git a/Core/SyncErrorHandler.swift b/Core/SyncErrorHandler.swift index a3ff07e794..ba9fe4e54a 100644 --- a/Core/SyncErrorHandler.swift +++ b/Core/SyncErrorHandler.swift @@ -100,6 +100,8 @@ public class SyncErrorHandler: EventMapping { Pixel.fire(pixel: .syncFailedToLoadAccount, error: error) case .failedToSetupEngine: Pixel.fire(pixel: .syncFailedToSetupEngine, error: error) + case .failedToReadSecureStore(let status): + Pixel.fire(pixel: .syncSecureStorageReadError, error: error) default: // Should this be so generic? let domainEvent = Pixel.Event.syncSentUnauthenticatedRequest diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index 42d05b4f6c..6c9f952180 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -10969,8 +10969,8 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit"; requirement = { - kind = exactVersion; - version = 203.1.0; + branch = "graeme/send-pixel-on-sync-secure-storage-failure"; + kind = branch; }; }; 9F8FE9472BAE50E50071E372 /* XCRemoteSwiftPackageReference "lottie-spm" */ = { From 4ce6378574662e38ae645ccdbc738005e6815257 Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Tue, 5 Nov 2024 13:34:50 +0100 Subject: [PATCH 2/4] Update BSK --- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 0be6bd842d..ee43e62db8 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" : "19f1e5c945aa92562ad2d087e8d6c99801edf656", - "version" : "203.1.0" + "branch" : "graeme/send-pixel-on-sync-secure-storage-failure", + "revision" : "ad32885472e561de7748b0a5ec16fd3fb3723101" } }, { From 36647727fdf5728aa9dd8448241cfb592c131cd8 Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Tue, 5 Nov 2024 14:26:58 +0100 Subject: [PATCH 3/4] Point to BSK 203.2.0 --- DuckDuckGo.xcodeproj/project.pbxproj | 4 ++-- .../xcshareddata/swiftpm/Package.resolved | 20 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index 6c9f952180..a72f2588fa 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -10969,8 +10969,8 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit"; requirement = { - branch = "graeme/send-pixel-on-sync-secure-storage-failure"; - kind = branch; + kind = exactVersion; + version = 203.2.0; }; }; 9F8FE9472BAE50E50071E372 /* XCRemoteSwiftPackageReference "lottie-spm" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index ee43e62db8..5f6afa28c4 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" : { - "branch" : "graeme/send-pixel-on-sync-secure-storage-failure", - "revision" : "ad32885472e561de7748b0a5ec16fd3fb3723101" + "revision" : "a7de5bc2fe128444495e6e8345026c8974076ad7", + "version" : "200.2.0" } }, { @@ -41,8 +41,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/duckduckgo/content-scope-scripts", "state" : { - "revision" : "48fee2508995d4ac02d18b3d55424adedcb4ce4f", - "version" : "6.28.0" + "revision" : "1ed569676555d493c9c5575eaed22aa02569aac9", + "version" : "6.19.0" } }, { @@ -59,8 +59,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/duckduckgo/duckduckgo-autofill.git", "state" : { - "revision" : "c992041d16ec10d790e6204dce9abf9966d1363c", - "version" : "15.1.0" + "revision" : "945ac09a0189dc6736db617867fde193ea984b20", + "version" : "15.0.0" } }, { @@ -122,8 +122,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/duckduckgo/privacy-dashboard", "state" : { - "revision" : "53fd1a0f8d91fcf475d9220f810141007300dffd", - "version" : "7.1.1" + "revision" : "9de2b2aa317a48d3ee31116dc15b0feeb2cc9414", + "version" : "5.3.0" } }, { @@ -176,8 +176,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/duckduckgo/sync_crypto", "state" : { - "revision" : "0c8bf3c0e75591bc366407b9d7a73a9fcfc7736f", - "version" : "0.3.0" + "revision" : "2ab6ab6f0f96b259c14c2de3fc948935fc16ac78", + "version" : "0.2.0" } }, { From fb132627d85d76e332f4646a7cc99d0b38d58a71 Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Tue, 5 Nov 2024 14:57:17 +0100 Subject: [PATCH 4/4] Silence linter warning --- Core/SyncErrorHandler.swift | 2 +- .../xcshareddata/swiftpm/Package.resolved | 20 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Core/SyncErrorHandler.swift b/Core/SyncErrorHandler.swift index ba9fe4e54a..93609732ba 100644 --- a/Core/SyncErrorHandler.swift +++ b/Core/SyncErrorHandler.swift @@ -100,7 +100,7 @@ public class SyncErrorHandler: EventMapping { Pixel.fire(pixel: .syncFailedToLoadAccount, error: error) case .failedToSetupEngine: Pixel.fire(pixel: .syncFailedToSetupEngine, error: error) - case .failedToReadSecureStore(let status): + case .failedToReadSecureStore: Pixel.fire(pixel: .syncSecureStorageReadError, error: error) default: // Should this be so generic? diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 5f6afa28c4..2a7682eb00 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" : "a7de5bc2fe128444495e6e8345026c8974076ad7", - "version" : "200.2.0" + "revision" : "56dbee74e34d37b6e699921a0b9bce2b8f22711d", + "version" : "203.2.0" } }, { @@ -41,8 +41,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/duckduckgo/content-scope-scripts", "state" : { - "revision" : "1ed569676555d493c9c5575eaed22aa02569aac9", - "version" : "6.19.0" + "revision" : "48fee2508995d4ac02d18b3d55424adedcb4ce4f", + "version" : "6.28.0" } }, { @@ -59,8 +59,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/duckduckgo/duckduckgo-autofill.git", "state" : { - "revision" : "945ac09a0189dc6736db617867fde193ea984b20", - "version" : "15.0.0" + "revision" : "c992041d16ec10d790e6204dce9abf9966d1363c", + "version" : "15.1.0" } }, { @@ -122,8 +122,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/duckduckgo/privacy-dashboard", "state" : { - "revision" : "9de2b2aa317a48d3ee31116dc15b0feeb2cc9414", - "version" : "5.3.0" + "revision" : "53fd1a0f8d91fcf475d9220f810141007300dffd", + "version" : "7.1.1" } }, { @@ -176,8 +176,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/duckduckgo/sync_crypto", "state" : { - "revision" : "2ab6ab6f0f96b259c14c2de3fc948935fc16ac78", - "version" : "0.2.0" + "revision" : "0c8bf3c0e75591bc366407b9d7a73a9fcfc7736f", + "version" : "0.3.0" } }, {