From b84cea1895e1162e052e7d4392b9c1a76a67ada0 Mon Sep 17 00:00:00 2001 From: Anya Mallon Date: Fri, 3 Jan 2025 16:28:29 +0100 Subject: [PATCH 1/4] Set to BSK branch --- DuckDuckGo.xcodeproj/project.pbxproj | 4 ++-- .../xcshareddata/swiftpm/Package.resolved | 11 +++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index f37fc692c7..b8c33bdc6c 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -11856,8 +11856,8 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit"; requirement = { - kind = exactVersion; - version = 223.0.0; + kind = revision; + revision = 2f3be083dd63d141472c7632d9c40605b0af4654; }; }; 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 a91a1f376a..d1443fcca7 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -32,8 +32,7 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/DuckDuckGo/BrowserServicesKit", "state" : { - "revision" : "e8f94cf597f4a447f86f39f461b736ac9ea280ce", - "version" : "223.0.0" + "revision" : "2f3be083dd63d141472c7632d9c40605b0af4654" } }, { @@ -41,8 +40,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/duckduckgo/content-scope-scripts", "state" : { - "revision" : "93ea6c3e771bc0b743b38cefbff548c10add9898", - "version" : "6.42.0" + "revision" : "bc808eb735d9eb72d5c54cf2452b104b6a370e25", + "version" : "6.43.0" } }, { @@ -122,8 +121,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/duckduckgo/privacy-dashboard", "state" : { - "revision" : "022c845b06ace6a4aa712a4fa3e79da32193d5c6", - "version" : "7.4.0" + "revision" : "2e2baf7d31c7d8e158a58bc1cb79498c1c727fd2", + "version" : "7.5.0" } }, { From f8d2dc865af0c6ec24e0686bd004ff4fa9faa3e7 Mon Sep 17 00:00:00 2001 From: Anya Mallon Date: Fri, 3 Jan 2025 16:33:12 +0100 Subject: [PATCH 2/4] Update calls to AutofillCredentialIdentityStoreManager to optionally provide a vault (and always provide SecureVaultReporter() since AutofillCredentialIdentityStoreManager can now init the vault lazily) --- .../CredentialProviderViewController.swift | 8 +++++--- Core/SyncCredentialsAdapter.swift | 3 +-- DuckDuckGo/AutofillLoginListViewModel.swift | 4 +++- DuckDuckGo/AutofillUsageMonitor.swift | 10 +++------- DuckDuckGo/TabViewController.swift | 12 ++++-------- 5 files changed, 16 insertions(+), 21 deletions(-) diff --git a/AutofillCredentialProvider/CredentialProvider/CredentialProviderViewController.swift b/AutofillCredentialProvider/CredentialProvider/CredentialProviderViewController.swift index 557b7292e7..8a609d164b 100644 --- a/AutofillCredentialProvider/CredentialProvider/CredentialProviderViewController.swift +++ b/AutofillCredentialProvider/CredentialProvider/CredentialProviderViewController.swift @@ -33,9 +33,11 @@ class CredentialProviderViewController: ASCredentialProviderViewController { private lazy var authenticator = UserAuthenticator(reason: UserText.credentialProviderListAuthenticationReason, cancelTitle: UserText.credentialProviderListAuthenticationCancelButton) - private lazy var credentialIdentityStoreManager: AutofillCredentialIdentityStoreManaging = AutofillCredentialIdentityStoreManager(credentialStore: ASCredentialIdentityStore.shared, - vault: secureVault, - tld: tld) + private lazy var credentialIdentityStoreManager: AutofillCredentialIdentityStoreManaging = AutofillCredentialIdentityStoreManager( + credentialStore: ASCredentialIdentityStore.shared, + vault: secureVault, + reporter: SecureVaultReporter(), + tld: tld) private lazy var secureVault: (any AutofillSecureVault)? = { if findKeychainItemsWithV4() { diff --git a/Core/SyncCredentialsAdapter.swift b/Core/SyncCredentialsAdapter.swift index 888341cc87..132dcd0505 100644 --- a/Core/SyncCredentialsAdapter.swift +++ b/Core/SyncCredentialsAdapter.swift @@ -47,8 +47,7 @@ public final class SyncCredentialsAdapter { secureVaultErrorReporter: secureVaultErrorReporter, errorEvents: CredentialsCleanupErrorHandling() ) - credentialIdentityStoreManager = AutofillCredentialIdentityStoreManager( - vault: try? secureVaultFactory.makeVault(reporter: secureVaultErrorReporter), tld: tld) + credentialIdentityStoreManager = AutofillCredentialIdentityStoreManager(reporter: secureVaultErrorReporter, tld: tld) } public func cleanUpDatabaseAndUpdateSchedule(shouldEnable: Bool) { diff --git a/DuckDuckGo/AutofillLoginListViewModel.swift b/DuckDuckGo/AutofillLoginListViewModel.swift index 3c267fda0d..f393e16166 100644 --- a/DuckDuckGo/AutofillLoginListViewModel.swift +++ b/DuckDuckGo/AutofillLoginListViewModel.swift @@ -88,7 +88,9 @@ final class AutofillLoginListViewModel: ObservableObject { return settings["monitorIntervalDays"] as? Int ?? 42 }() - private lazy var credentialIdentityStoreManager: AutofillCredentialIdentityStoreManaging = AutofillCredentialIdentityStoreManager(vault: secureVault, tld: tld) + private lazy var credentialIdentityStoreManager: AutofillCredentialIdentityStoreManaging = AutofillCredentialIdentityStoreManager(vault: secureVault, + reporter: SecureVaultReporter(), + tld: tld) private lazy var syncPromoManager: SyncPromoManaging = SyncPromoManager(syncService: syncService) diff --git a/DuckDuckGo/AutofillUsageMonitor.swift b/DuckDuckGo/AutofillUsageMonitor.swift index 6123c43180..03c2870aeb 100644 --- a/DuckDuckGo/AutofillUsageMonitor.swift +++ b/DuckDuckGo/AutofillUsageMonitor.swift @@ -23,12 +23,8 @@ import BrowserServicesKit final class AutofillUsageMonitor { - private lazy var credentialIdentityStoreManager: AutofillCredentialIdentityStoreManager? = { - guard let vault = try? AutofillSecureVaultFactory.makeVault(reporter: SecureVaultReporter()) else { - return nil - } - - return AutofillCredentialIdentityStoreManager(vault: vault, + private lazy var credentialIdentityStoreManager: AutofillCredentialIdentityStoreManager = { + return AutofillCredentialIdentityStoreManager(reporter: SecureVaultReporter(), tld: AppDependencyProvider.shared.storageCache.tld) }() @@ -39,7 +35,7 @@ final class AutofillUsageMonitor { if state.isEnabled { if self?.autofillExtensionEnabled == nil { Task { - await self?.credentialIdentityStoreManager?.populateCredentialStore() + await self?.credentialIdentityStoreManager.populateCredentialStore() } } self?.autofillExtensionEnabled = true diff --git a/DuckDuckGo/TabViewController.swift b/DuckDuckGo/TabViewController.swift index 031dd5ea55..9b1d34cdc8 100644 --- a/DuckDuckGo/TabViewController.swift +++ b/DuckDuckGo/TabViewController.swift @@ -276,12 +276,8 @@ class TabViewController: UIViewController { return manager }() - private lazy var credentialIdentityStoreManager: AutofillCredentialIdentityStoreManager? = { - guard let vault = try? AutofillSecureVaultFactory.makeVault(reporter: SecureVaultReporter()) else { - return nil - } - - return AutofillCredentialIdentityStoreManager(vault: vault, + private lazy var credentialIdentityStoreManager: AutofillCredentialIdentityStoreManager = { + return AutofillCredentialIdentityStoreManager(reporter: SecureVaultReporter(), tld: AppDependencyProvider.shared.storageCache.tld) }() @@ -2851,7 +2847,7 @@ extension TabViewController: SecureVaultManagerDelegate { guard let domain = account?.domain else { return } Task { - await self?.credentialIdentityStoreManager?.updateCredentialStore(for: domain) + await self?.credentialIdentityStoreManager.updateCredentialStore(for: domain) } } completionHandler: { account in if account != nil { @@ -3049,7 +3045,7 @@ extension TabViewController: SaveLoginViewControllerDelegate { guard let domain = newCredential.account.domain else { return } Task { - await credentialIdentityStoreManager?.updateCredentialStore(for: domain) + await credentialIdentityStoreManager.updateCredentialStore(for: domain) } } } catch { From 6dd46d5686eb635e86e6c517c73c81d076a37f6c Mon Sep 17 00:00:00 2001 From: amddg44 Date: Wed, 8 Jan 2025 22:05:33 +0100 Subject: [PATCH 3/4] Bump BSK commit --- DuckDuckGo.xcodeproj/project.pbxproj | 2 +- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index e59b9d787d..33b9746949 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -11865,7 +11865,7 @@ repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit"; requirement = { kind = revision; - revision = 2f3be083dd63d141472c7632d9c40605b0af4654; + revision = cd3c51a6684e3cc7573db41bf73e002c4ee58fa1; }; }; 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 e51a4a0f16..bea153b412 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -32,7 +32,7 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/DuckDuckGo/BrowserServicesKit", "state" : { - "revision" : "2f3be083dd63d141472c7632d9c40605b0af4654" + "revision" : "cd3c51a6684e3cc7573db41bf73e002c4ee58fa1" } }, { From b8ed875e1ee345f951f33e84266ba142aea67202 Mon Sep 17 00:00:00 2001 From: amddg44 Date: Wed, 8 Jan 2025 22:29:13 +0100 Subject: [PATCH 4/4] Set BSK release --- DuckDuckGo.xcodeproj/project.pbxproj | 4 ++-- .../xcshareddata/swiftpm/Package.resolved | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index 33b9746949..8fa7c1d4ab 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -11864,8 +11864,8 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit"; requirement = { - kind = revision; - revision = cd3c51a6684e3cc7573db41bf73e002c4ee58fa1; + kind = exactVersion; + version = 224.1.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 bea153b412..b0bbd57449 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -32,7 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/DuckDuckGo/BrowserServicesKit", "state" : { - "revision" : "cd3c51a6684e3cc7573db41bf73e002c4ee58fa1" + "revision" : "14384f05a6e43842c4626e06736e2c4f5d758057", + "version" : "224.1.0" } }, { @@ -58,8 +59,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/duckduckgo/duckduckgo-autofill.git", "state" : { - "revision" : "88982a3802ac504e2f1a118a73bfdf2d8f4a7735", - "version" : "16.0.0" + "revision" : "47c26dc32b94cdbcef3e6157497147917678c25c", + "version" : "16.1.0" } }, {