From 6e63e29afb1863fb3a62f4a4a65a3def19f3087e Mon Sep 17 00:00:00 2001 From: "bw-ghapp[bot]" <178206702+bw-ghapp[bot]@users.noreply.github.com> Date: Thu, 11 Sep 2025 19:07:16 +0000 Subject: [PATCH 1/7] SDK Update - c16a299 (1.0.0-283-7b5d9db) --- project-common.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project-common.yml b/project-common.yml index 195cf1fc04..17ad0de764 100644 --- a/project-common.yml +++ b/project-common.yml @@ -14,7 +14,7 @@ include: packages: BitwardenSdk: url: https://github.com/bitwarden/sdk-swift - revision: 730c5b9c07bc4980ec13982594ba79b28f38d19b # 1.0.0-2282-5658d61 + revision: c16a299ed4002185c1aba08ac921e7aef6169366 # 1.0.0-283-7b5d9db branch: unstable Firebase: url: https://github.com/firebase/firebase-ios-sdk From 7e2a8527fa4d342d5edc59a8e8593ed05f348858 Mon Sep 17 00:00:00 2001 From: "bw-ghapp[bot]" <178206702+bw-ghapp[bot]@users.noreply.github.com> Date: Thu, 11 Sep 2025 19:23:39 +0000 Subject: [PATCH 2/7] SDK Update - 8b605c5 (1.0.0-2301-0b6d9c4) --- project-common.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project-common.yml b/project-common.yml index 17ad0de764..22e8b0a8af 100644 --- a/project-common.yml +++ b/project-common.yml @@ -14,7 +14,7 @@ include: packages: BitwardenSdk: url: https://github.com/bitwarden/sdk-swift - revision: c16a299ed4002185c1aba08ac921e7aef6169366 # 1.0.0-283-7b5d9db + revision: 8b605c51de8566878d22fbda609dd7ab9d265fe5 # 1.0.0-2301-0b6d9c4 branch: unstable Firebase: url: https://github.com/firebase/firebase-ios-sdk From de95709cfe68aeab54cf57b69aca8e857edaa366 Mon Sep 17 00:00:00 2001 From: "bw-ghapp[bot]" <178206702+bw-ghapp[bot]@users.noreply.github.com> Date: Tue, 16 Sep 2025 21:14:13 +0000 Subject: [PATCH 3/7] SDK Update - 3e310f8 (1.0.0-2394-72f4866) --- project-common.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project-common.yml b/project-common.yml index 22e8b0a8af..68462fbb3e 100644 --- a/project-common.yml +++ b/project-common.yml @@ -14,7 +14,7 @@ include: packages: BitwardenSdk: url: https://github.com/bitwarden/sdk-swift - revision: 8b605c51de8566878d22fbda609dd7ab9d265fe5 # 1.0.0-2301-0b6d9c4 + revision: 3e310f8873242628f1cc2096d50033d2f5fdeeea # 1.0.0-2394-72f4866 branch: unstable Firebase: url: https://github.com/firebase/firebase-ios-sdk From 1801587322e7e6694366092c7e2dbe36b3aca88d Mon Sep 17 00:00:00 2001 From: "bw-ghapp[bot]" <178206702+bw-ghapp[bot]@users.noreply.github.com> Date: Wed, 17 Sep 2025 14:41:15 +0000 Subject: [PATCH 4/7] SDK Update - f14c06f (1.0.0-2413-0eba924) --- project-common.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project-common.yml b/project-common.yml index 68462fbb3e..e8633d40ae 100644 --- a/project-common.yml +++ b/project-common.yml @@ -14,7 +14,7 @@ include: packages: BitwardenSdk: url: https://github.com/bitwarden/sdk-swift - revision: 3e310f8873242628f1cc2096d50033d2f5fdeeea # 1.0.0-2394-72f4866 + revision: f14c06fd4f77b290dfd447aadd80a3bbc54da97c # 1.0.0-2413-0eba924 branch: unstable Firebase: url: https://github.com/firebase/firebase-ios-sdk From 22d0dbf61b349922e7860a6ad54851f81a8dad1a Mon Sep 17 00:00:00 2001 From: Matt Czech Date: Thu, 18 Sep 2025 12:00:00 -0500 Subject: [PATCH 5/7] Add archivedDate properties --- .../BitwardenSdk+VaultMocking.swift | 7 +++++-- .../BitwardenSdk+VaultFixtures.swift | 16 +++++++++++---- .../Vault/Extensions/BitwardenSdk+Vault.swift | 7 +++++-- .../Extensions/BitwardenSdkVaultTests.swift | 6 ++++-- .../CipherListView+Extensions.swift | 1 + .../Fixtures/CipherListView+Fixtures.swift | 4 ++++ .../Response/CipherDetailsResponseModel.swift | 3 +++ .../CipherDetailsResponseModel+Fixtures.swift | 2 ++ .../API/Cipher/CipherAPIServiceTests.swift | 4 ++++ .../BitwardenSdk+VaultMocking.swift | 7 +++++-- .../BitwardenSdk+VaultFixtures.swift | 20 +++++++++++++++---- .../AddEditItem/AddItemStateTests.swift | 2 ++ .../UI/Vault/VaultItem/CipherItemState.swift | 3 ++- .../Extensions/Cipher+Update.swift | 6 ++++-- .../Extensions/CipherView+Update.swift | 6 ++++-- 15 files changed, 73 insertions(+), 21 deletions(-) diff --git a/AuthenticatorShared/Core/Vault/Services/TestHelpers/BitwardenSdk+VaultMocking.swift b/AuthenticatorShared/Core/Vault/Services/TestHelpers/BitwardenSdk+VaultMocking.swift index 1f8755c3f3..705c1897d1 100644 --- a/AuthenticatorShared/Core/Vault/Services/TestHelpers/BitwardenSdk+VaultMocking.swift +++ b/AuthenticatorShared/Core/Vault/Services/TestHelpers/BitwardenSdk+VaultMocking.swift @@ -77,6 +77,7 @@ extension CipherListView { creationDate: cipher.creationDate, deletedDate: cipher.deletedDate, revisionDate: cipher.revisionDate, + archivedDate: cipher.archivedDate, copyableFields: [], localData: cipher.localData.map(LocalDataView.init) ) @@ -138,7 +139,8 @@ extension Cipher { passwordHistory: cipherView.passwordHistory?.map(PasswordHistory.init), creationDate: cipherView.creationDate, deletedDate: cipherView.deletedDate, - revisionDate: cipherView.revisionDate + revisionDate: cipherView.revisionDate, + archivedDate: cipherView.archivedDate ) } } @@ -171,7 +173,8 @@ extension CipherView { passwordHistory: cipher.passwordHistory?.map(PasswordHistoryView.init), creationDate: cipher.creationDate, deletedDate: cipher.deletedDate, - revisionDate: cipher.revisionDate + revisionDate: cipher.revisionDate, + archivedDate: cipher.archivedDate ) } } diff --git a/AuthenticatorShared/UI/Vault/PreviewContent/BitwardenSdk+VaultFixtures.swift b/AuthenticatorShared/UI/Vault/PreviewContent/BitwardenSdk+VaultFixtures.swift index bb6d6cd8f5..6f303ddfbb 100644 --- a/AuthenticatorShared/UI/Vault/PreviewContent/BitwardenSdk+VaultFixtures.swift +++ b/AuthenticatorShared/UI/Vault/PreviewContent/BitwardenSdk+VaultFixtures.swift @@ -27,6 +27,7 @@ extension AttachmentView { extension Cipher { static func fixture( + archivedDate: Date? = nil, attachments: [Attachment]? = nil, card: Card? = nil, collectionIds: [String] = [], @@ -80,13 +81,15 @@ extension Cipher { passwordHistory: passwordHistory, creationDate: creationDate, deletedDate: deletedDate, - revisionDate: revisionDate + revisionDate: revisionDate, + archivedDate: archivedDate ) } } extension CipherView { static func fixture( + archivedDate: Date? = nil, attachments: [AttachmentView]? = nil, card: CardView? = nil, collectionIds: [String] = [], @@ -140,11 +143,13 @@ extension CipherView { passwordHistory: passwordHistory, creationDate: creationDate, deletedDate: deletedDate, - revisionDate: revisionDate + revisionDate: revisionDate, + archivedDate: archivedDate ) } static func cardFixture( + archivedDate: Date? = nil, attachments: [AttachmentView]? = nil, card: CardView = CardView.fixture(), collectionIds: [String] = [], @@ -193,11 +198,13 @@ extension CipherView { passwordHistory: passwordHistory, creationDate: creationDate, deletedDate: deletedDate, - revisionDate: revisionDate + revisionDate: revisionDate, + archivedDate: archivedDate ) } static func loginFixture( + archivedDate: Date? = nil, attachments: [AttachmentView]? = nil, collectionIds: [String] = [], creationDate: DateTime = Date(year: 2023, month: 11, day: 5, hour: 9, minute: 41), @@ -246,7 +253,8 @@ extension CipherView { passwordHistory: passwordHistory, creationDate: creationDate, deletedDate: deletedDate, - revisionDate: revisionDate + revisionDate: revisionDate, + archivedDate: archivedDate ) } diff --git a/BitwardenShared/Core/Vault/Extensions/BitwardenSdk+Vault.swift b/BitwardenShared/Core/Vault/Extensions/BitwardenSdk+Vault.swift index 941fe465ad..4d6bac1295 100644 --- a/BitwardenShared/Core/Vault/Extensions/BitwardenSdk+Vault.swift +++ b/BitwardenShared/Core/Vault/Extensions/BitwardenSdk+Vault.swift @@ -61,6 +61,7 @@ extension CipherDetailsResponseModel { init(cipher: BitwardenSdk.Cipher) throws { guard let id = cipher.id else { throw DataMappingError.invalidData } self.init( + archivedDate: cipher.archivedDate, attachments: cipher.attachments?.map(AttachmentResponseModel.init), card: cipher.card.map(CipherCardModel.init), collectionIds: cipher.collectionIds, @@ -353,7 +354,8 @@ extension BitwardenSdk.Cipher { passwordHistory: model.passwordHistory?.map(PasswordHistory.init), creationDate: model.creationDate, deletedDate: model.deletedDate, - revisionDate: model.revisionDate + revisionDate: model.revisionDate, + archivedDate: model.archivedDate ) } } @@ -432,7 +434,8 @@ extension BitwardenSdk.CipherView: @retroactive Identifiable, Fido2UserVerifiabl passwordHistory: nil, creationDate: timeProvider.presentTime, deletedDate: nil, - revisionDate: timeProvider.presentTime + revisionDate: timeProvider.presentTime, + archivedDate: nil ) } } diff --git a/BitwardenShared/Core/Vault/Extensions/BitwardenSdkVaultTests.swift b/BitwardenShared/Core/Vault/Extensions/BitwardenSdkVaultTests.swift index dbc7778f81..f88efca839 100644 --- a/BitwardenShared/Core/Vault/Extensions/BitwardenSdkVaultTests.swift +++ b/BitwardenShared/Core/Vault/Extensions/BitwardenSdkVaultTests.swift @@ -208,7 +208,8 @@ class CipherViewTests: BitwardenTestCase { passwordHistory: nil, creationDate: timeProvider.presentTime, deletedDate: nil, - revisionDate: timeProvider.presentTime + revisionDate: timeProvider.presentTime, + archivedDate: nil ) ) } @@ -258,7 +259,8 @@ class CipherViewTests: BitwardenTestCase { passwordHistory: nil, creationDate: timeProvider.presentTime, deletedDate: nil, - revisionDate: timeProvider.presentTime + revisionDate: timeProvider.presentTime, + archivedDate: nil ) ) } diff --git a/BitwardenShared/Core/Vault/Extensions/CipherListView+Extensions.swift b/BitwardenShared/Core/Vault/Extensions/CipherListView+Extensions.swift index f38315700c..dcc524d4df 100644 --- a/BitwardenShared/Core/Vault/Extensions/CipherListView+Extensions.swift +++ b/BitwardenShared/Core/Vault/Extensions/CipherListView+Extensions.swift @@ -67,6 +67,7 @@ extension CipherListView { creationDate: cipher.creationDate, deletedDate: cipher.deletedDate, revisionDate: cipher.revisionDate, + archivedDate: cipher.archivedDate, copyableFields: [], localData: nil ) diff --git a/BitwardenShared/Core/Vault/Models/Domain/Fixtures/CipherListView+Fixtures.swift b/BitwardenShared/Core/Vault/Models/Domain/Fixtures/CipherListView+Fixtures.swift index b598f69f44..c2eba3f506 100644 --- a/BitwardenShared/Core/Vault/Models/Domain/Fixtures/CipherListView+Fixtures.swift +++ b/BitwardenShared/Core/Vault/Models/Domain/Fixtures/CipherListView+Fixtures.swift @@ -22,6 +22,7 @@ extension CipherListView { creationDate: Date = Date(), deletedDate: Date? = nil, revisionDate: Date = Date(), + archivedDate: Date? = nil, copyableFields: [CopyableCipherFields] = [], localData: LocalDataView? = nil ) -> CipherListView { @@ -45,6 +46,7 @@ extension CipherListView { creationDate: creationDate, deletedDate: deletedDate, revisionDate: revisionDate, + archivedDate: archivedDate, copyableFields: copyableFields, localData: localData ) @@ -70,6 +72,7 @@ extension CipherListView { creationDate: Date = Date(), deletedDate: Date? = nil, revisionDate: Date = Date(), + archivedDate: Date? = nil, copyableFields: [CopyableCipherFields] = [], localData: LocalDataView? = nil ) -> CipherListView { @@ -93,6 +96,7 @@ extension CipherListView { creationDate: creationDate, deletedDate: deletedDate, revisionDate: revisionDate, + archivedDate: archivedDate, copyableFields: copyableFields, localData: localData ) diff --git a/BitwardenShared/Core/Vault/Models/Response/CipherDetailsResponseModel.swift b/BitwardenShared/Core/Vault/Models/Response/CipherDetailsResponseModel.swift index eb6cf49f33..bae4ffadaf 100644 --- a/BitwardenShared/Core/Vault/Models/Response/CipherDetailsResponseModel.swift +++ b/BitwardenShared/Core/Vault/Models/Response/CipherDetailsResponseModel.swift @@ -6,6 +6,9 @@ import Networking struct CipherDetailsResponseModel: JSONResponse, Equatable { // MARK: Properties + /// The date the cipher was archived. + let archivedDate: Date? + /// The cipher's list of attachments. let attachments: [AttachmentResponseModel]? diff --git a/BitwardenShared/Core/Vault/Models/Response/Fixtures/CipherDetailsResponseModel+Fixtures.swift b/BitwardenShared/Core/Vault/Models/Response/Fixtures/CipherDetailsResponseModel+Fixtures.swift index c7d6cbaa18..8aef7ad94f 100644 --- a/BitwardenShared/Core/Vault/Models/Response/Fixtures/CipherDetailsResponseModel+Fixtures.swift +++ b/BitwardenShared/Core/Vault/Models/Response/Fixtures/CipherDetailsResponseModel+Fixtures.swift @@ -4,6 +4,7 @@ import Foundation extension CipherDetailsResponseModel { static func fixture( + archivedDate: Date? = nil, attachments: [AttachmentResponseModel]? = nil, card: CipherCardModel? = nil, collectionIds: [String] = [], @@ -31,6 +32,7 @@ extension CipherDetailsResponseModel { viewPassword: Bool = false ) -> CipherDetailsResponseModel { self.init( + archivedDate: archivedDate, attachments: attachments, card: card, collectionIds: collectionIds, diff --git a/BitwardenShared/Core/Vault/Services/API/Cipher/CipherAPIServiceTests.swift b/BitwardenShared/Core/Vault/Services/API/Cipher/CipherAPIServiceTests.swift index b7576fd361..bbeddd867c 100644 --- a/BitwardenShared/Core/Vault/Services/API/Cipher/CipherAPIServiceTests.swift +++ b/BitwardenShared/Core/Vault/Services/API/Cipher/CipherAPIServiceTests.swift @@ -47,6 +47,7 @@ class CipherAPIServiceTests: XCTestCase { // swiftlint:disable:this type_body_le XCTAssertEqual( response, CipherDetailsResponseModel( + archivedDate: nil, attachments: nil, card: nil, collectionIds: nil, @@ -101,6 +102,7 @@ class CipherAPIServiceTests: XCTestCase { // swiftlint:disable:this type_body_le XCTAssertEqual( response, CipherDetailsResponseModel( + archivedDate: nil, attachments: nil, card: nil, collectionIds: nil, @@ -221,6 +223,7 @@ class CipherAPIServiceTests: XCTestCase { // swiftlint:disable:this type_body_le SaveAttachmentResponse( attachmentId: "1", cipherResponse: CipherDetailsResponseModel( + archivedDate: nil, attachments: [ .init( fileName: "2.q4Pl+Pz7D3sxr1VEKuwke", @@ -287,6 +290,7 @@ class CipherAPIServiceTests: XCTestCase { // swiftlint:disable:this type_body_le XCTAssertEqual( response, CipherDetailsResponseModel( + archivedDate: nil, attachments: nil, card: nil, collectionIds: nil, diff --git a/BitwardenShared/Core/Vault/Services/TestHelpers/BitwardenSdk+VaultMocking.swift b/BitwardenShared/Core/Vault/Services/TestHelpers/BitwardenSdk+VaultMocking.swift index 1f8755c3f3..705c1897d1 100644 --- a/BitwardenShared/Core/Vault/Services/TestHelpers/BitwardenSdk+VaultMocking.swift +++ b/BitwardenShared/Core/Vault/Services/TestHelpers/BitwardenSdk+VaultMocking.swift @@ -77,6 +77,7 @@ extension CipherListView { creationDate: cipher.creationDate, deletedDate: cipher.deletedDate, revisionDate: cipher.revisionDate, + archivedDate: cipher.archivedDate, copyableFields: [], localData: cipher.localData.map(LocalDataView.init) ) @@ -138,7 +139,8 @@ extension Cipher { passwordHistory: cipherView.passwordHistory?.map(PasswordHistory.init), creationDate: cipherView.creationDate, deletedDate: cipherView.deletedDate, - revisionDate: cipherView.revisionDate + revisionDate: cipherView.revisionDate, + archivedDate: cipherView.archivedDate ) } } @@ -171,7 +173,8 @@ extension CipherView { passwordHistory: cipher.passwordHistory?.map(PasswordHistoryView.init), creationDate: cipher.creationDate, deletedDate: cipher.deletedDate, - revisionDate: cipher.revisionDate + revisionDate: cipher.revisionDate, + archivedDate: cipher.archivedDate ) } } diff --git a/BitwardenShared/UI/Vault/PreviewContent/BitwardenSdk+VaultFixtures.swift b/BitwardenShared/UI/Vault/PreviewContent/BitwardenSdk+VaultFixtures.swift index d92bee2f72..0ac81bca8a 100644 --- a/BitwardenShared/UI/Vault/PreviewContent/BitwardenSdk+VaultFixtures.swift +++ b/BitwardenShared/UI/Vault/PreviewContent/BitwardenSdk+VaultFixtures.swift @@ -27,6 +27,7 @@ extension AttachmentView { extension Cipher { static func fixture( + archivedDate: Date? = nil, attachments: [Attachment]? = nil, card: Card? = nil, collectionIds: [String] = [], @@ -80,7 +81,8 @@ extension Cipher { passwordHistory: passwordHistory, creationDate: creationDate, deletedDate: deletedDate, - revisionDate: revisionDate + revisionDate: revisionDate, + archivedDate: archivedDate ) } } @@ -106,6 +108,7 @@ extension CipherListView { creationDate: DateTime = Date(year: 2023, month: 11, day: 5, hour: 9, minute: 41), deletedDate: DateTime? = nil, revisionDate: DateTime = Date(year: 2023, month: 11, day: 5, hour: 9, minute: 41), + archivedDate: DateTime? = nil, copyableFields: [CopyableCipherFields] = [], localData: LocalDataView? = nil ) -> CipherListView { @@ -129,6 +132,7 @@ extension CipherListView { creationDate: creationDate, deletedDate: deletedDate, revisionDate: revisionDate, + archivedDate: archivedDate, copyableFields: copyableFields, localData: localData ) @@ -154,6 +158,7 @@ extension CipherListView { creationDate: DateTime = Date(year: 2023, month: 11, day: 5, hour: 9, minute: 41), deletedDate: DateTime? = nil, revisionDate: DateTime = Date(year: 2023, month: 11, day: 5, hour: 9, minute: 41), + archivedDate: DateTime? = nil, copyableFields: [CopyableCipherFields] = [], localData: LocalDataView? = nil ) -> CipherListView { @@ -177,6 +182,7 @@ extension CipherListView { creationDate: creationDate, deletedDate: deletedDate, revisionDate: revisionDate, + archivedDate: archivedDate, copyableFields: copyableFields, localData: localData ) @@ -185,6 +191,7 @@ extension CipherListView { extension CipherView { static func fixture( + archivedDate: Date? = nil, attachments: [AttachmentView]? = nil, card: CardView? = nil, collectionIds: [String] = [], @@ -238,11 +245,13 @@ extension CipherView { passwordHistory: passwordHistory, creationDate: creationDate, deletedDate: deletedDate, - revisionDate: revisionDate + revisionDate: revisionDate, + archivedDate: archivedDate ) } static func cardFixture( + archivedDate: Date? = nil, attachments: [AttachmentView]? = nil, card: CardView = CardView.fixture(), collectionIds: [String] = [], @@ -291,11 +300,13 @@ extension CipherView { passwordHistory: passwordHistory, creationDate: creationDate, deletedDate: deletedDate, - revisionDate: revisionDate + revisionDate: revisionDate, + archivedDate: archivedDate ) } static func loginFixture( + archivedDate: Date? = nil, attachments: [AttachmentView]? = nil, collectionIds: [String] = [], creationDate: DateTime = Date(year: 2023, month: 11, day: 5, hour: 9, minute: 41), @@ -344,7 +355,8 @@ extension CipherView { passwordHistory: passwordHistory, creationDate: creationDate, deletedDate: deletedDate, - revisionDate: revisionDate + revisionDate: revisionDate, + archivedDate: archivedDate ) } diff --git a/BitwardenShared/UI/Vault/VaultItem/AddEditItem/AddItemStateTests.swift b/BitwardenShared/UI/Vault/VaultItem/AddEditItem/AddItemStateTests.swift index 031181475b..567b810824 100644 --- a/BitwardenShared/UI/Vault/VaultItem/AddEditItem/AddItemStateTests.swift +++ b/BitwardenShared/UI/Vault/VaultItem/AddEditItem/AddItemStateTests.swift @@ -17,6 +17,7 @@ class AddItemStateTests: XCTestCase { assertInlineSnapshot(of: subject.newCipherView(creationDate: Date(year: 2023, month: 10, day: 20)), as: .dump) { """ ▿ CipherView + - archivedDate: Optional.none - attachments: Optional>.none - card: Optional.none - collectionIds: 0 elements @@ -70,6 +71,7 @@ class AddItemStateTests: XCTestCase { assertInlineSnapshot(of: subject.newCipherView(creationDate: Date(year: 2023, month: 9, day: 1)), as: .dump) { """ ▿ CipherView + - archivedDate: Optional.none - attachments: Optional>.none - card: Optional.none - collectionIds: 0 elements diff --git a/BitwardenShared/UI/Vault/VaultItem/CipherItemState.swift b/BitwardenShared/UI/Vault/VaultItem/CipherItemState.swift index 0aa918b541..52cb72bf6d 100644 --- a/BitwardenShared/UI/Vault/VaultItem/CipherItemState.swift +++ b/BitwardenShared/UI/Vault/VaultItem/CipherItemState.swift @@ -587,7 +587,8 @@ extension CipherItemState { passwordHistory: nil, creationDate: creationDate, deletedDate: nil, - revisionDate: creationDate + revisionDate: creationDate, + archivedDate: nil ) } } // swiftlint:disable:this file_length diff --git a/BitwardenShared/UI/Vault/VaultItem/ViewItem/ViewLoginItem/Extensions/Cipher+Update.swift b/BitwardenShared/UI/Vault/VaultItem/ViewItem/ViewLoginItem/Extensions/Cipher+Update.swift index 38ff39d981..d05f10aca6 100644 --- a/BitwardenShared/UI/Vault/VaultItem/ViewItem/ViewLoginItem/Extensions/Cipher+Update.swift +++ b/BitwardenShared/UI/Vault/VaultItem/ViewItem/ViewLoginItem/Extensions/Cipher+Update.swift @@ -33,7 +33,8 @@ extension Cipher { passwordHistory: passwordHistory, creationDate: creationDate, deletedDate: deletedDate, - revisionDate: revisionDate + revisionDate: revisionDate, + archivedDate: archivedDate ) } @@ -69,7 +70,8 @@ extension Cipher { passwordHistory: passwordHistory, creationDate: creationDate, deletedDate: deletedDate, - revisionDate: revisionDate + revisionDate: revisionDate, + archivedDate: archivedDate ) } } diff --git a/BitwardenShared/UI/Vault/VaultItem/ViewItem/ViewLoginItem/Extensions/CipherView+Update.swift b/BitwardenShared/UI/Vault/VaultItem/ViewItem/ViewLoginItem/Extensions/CipherView+Update.swift index 7e1c48d26d..15bfb741bd 100644 --- a/BitwardenShared/UI/Vault/VaultItem/ViewItem/ViewLoginItem/Extensions/CipherView+Update.swift +++ b/BitwardenShared/UI/Vault/VaultItem/ViewItem/ViewLoginItem/Extensions/CipherView+Update.swift @@ -199,7 +199,8 @@ extension CipherView { passwordHistory: passwordHistory, creationDate: creationDate, deletedDate: deletedDate, - revisionDate: revisionDate + revisionDate: revisionDate, + archivedDate: archivedDate ) } @@ -349,7 +350,8 @@ extension CipherView { passwordHistory: passwordHistory, creationDate: creationDate, deletedDate: deletedDate, - revisionDate: revisionDate + revisionDate: revisionDate, + archivedDate: archivedDate ) } } From 866f36057da6e2709b7485b5c5403c5b81091d1e Mon Sep 17 00:00:00 2001 From: Matt Czech Date: Thu, 18 Sep 2025 12:00:24 -0500 Subject: [PATCH 6/7] Add mock methods to MockCryptoClient --- .../TestHelpers/MockCryptoClient.swift | 33 ++++++++++++++++++ .../TestHelpers/MockCryptoClient.swift | 34 +++++++++++++++++++ 2 files changed, 67 insertions(+) diff --git a/AuthenticatorShared/Core/Auth/Services/TestHelpers/MockCryptoClient.swift b/AuthenticatorShared/Core/Auth/Services/TestHelpers/MockCryptoClient.swift index 8454688413..bbec3f1665 100644 --- a/AuthenticatorShared/Core/Auth/Services/TestHelpers/MockCryptoClient.swift +++ b/AuthenticatorShared/Core/Auth/Services/TestHelpers/MockCryptoClient.swift @@ -44,6 +44,28 @@ class MockCryptoClient: CryptoClientProtocol { var initializeUserCryptoRequest: InitUserCryptoRequest? var initializeUserCryptoResult: Result = .success(()) + var makeUpdateKdfKdf: Kdf? + var makeUpdateKdfPassword: String? + var makeUpdateKdfResult: Result = .success( + UpdateKdfResponse( + masterPasswordAuthenticationData: MasterPasswordAuthenticationData( + kdf: .pbkdf2(iterations: NonZeroU32(600_000)), + salt: "AUTHENTICATION_SALT", + masterPasswordAuthenticationHash: "MASTER_PASSWORD_AUTHENTICATION_HASH" + ), + masterPasswordUnlockData: MasterPasswordUnlockData( + kdf: .pbkdf2(iterations: NonZeroU32(600_000)), + masterKeyWrappedUserKey: "MASTER_KEY_WRAPPED_USER_KEY", + salt: "UNLOCK_SALT" + ), + oldMasterPasswordAuthenticationData: MasterPasswordAuthenticationData( + kdf: .pbkdf2(iterations: NonZeroU32(600_000)), + salt: "OLD_AUTHENTICATION_SALT", + masterPasswordAuthenticationHash: "MASTER_PASSWORD_AUTHENTICATION_HASH" + ) + ) + ) + var updatePasswordNewPassword: String? var updatePasswordResult: Result = .success( UpdatePasswordResponse( @@ -95,6 +117,17 @@ class MockCryptoClient: CryptoClientProtocol { return try initializeUserCryptoResult.get() } + func makeUpdateKdf(password: String, kdf: Kdf) throws -> UpdateKdfResponse { + makeUpdateKdfPassword = password + makeUpdateKdfKdf = kdf + return try makeUpdateKdfResult.get() + } + + func makeUpdatePassword(newPassword: String) throws -> UpdatePasswordResponse { + updatePasswordNewPassword = newPassword + return try updatePasswordResult.get() + } + func updatePassword(newPassword: String) throws -> BitwardenSdk.UpdatePasswordResponse { updatePasswordNewPassword = newPassword return try updatePasswordResult.get() diff --git a/BitwardenShared/Core/Auth/Services/TestHelpers/MockCryptoClient.swift b/BitwardenShared/Core/Auth/Services/TestHelpers/MockCryptoClient.swift index e3bc5b650c..5f0b244b9e 100644 --- a/BitwardenShared/Core/Auth/Services/TestHelpers/MockCryptoClient.swift +++ b/BitwardenShared/Core/Auth/Services/TestHelpers/MockCryptoClient.swift @@ -1,3 +1,4 @@ +import BitwardenKit import BitwardenSdk @testable import BitwardenShared @@ -45,6 +46,28 @@ class MockCryptoClient: CryptoClientProtocol { var initializeUserCryptoRequest: InitUserCryptoRequest? var initializeUserCryptoResult: Result = .success(()) + var makeUpdateKdfKdf: Kdf? + var makeUpdateKdfPassword: String? + var makeUpdateKdfResult: Result = .success( + UpdateKdfResponse( + masterPasswordAuthenticationData: MasterPasswordAuthenticationData( + kdf: .pbkdf2(iterations: NonZeroU32(Constants.pbkdf2Iterations)), + salt: "AUTHENTICATION_SALT", + masterPasswordAuthenticationHash: "MASTER_PASSWORD_AUTHENTICATION_HASH" + ), + masterPasswordUnlockData: MasterPasswordUnlockData( + kdf: .pbkdf2(iterations: NonZeroU32(Constants.pbkdf2Iterations)), + masterKeyWrappedUserKey: "MASTER_KEY_WRAPPED_USER_KEY", + salt: "UNLOCK_SALT" + ), + oldMasterPasswordAuthenticationData: MasterPasswordAuthenticationData( + kdf: .pbkdf2(iterations: NonZeroU32(Constants.pbkdf2Iterations)), + salt: "OLD_AUTHENTICATION_SALT", + masterPasswordAuthenticationHash: "MASTER_PASSWORD_AUTHENTICATION_HASH" + ) + ) + ) + var updatePasswordNewPassword: String? var updatePasswordResult: Result = .success( UpdatePasswordResponse( @@ -97,6 +120,17 @@ class MockCryptoClient: CryptoClientProtocol { return try initializeUserCryptoResult.get() } + func makeUpdateKdf(password: String, kdf: Kdf) throws -> UpdateKdfResponse { + makeUpdateKdfPassword = password + makeUpdateKdfKdf = kdf + return try makeUpdateKdfResult.get() + } + + func makeUpdatePassword(newPassword: String) throws -> UpdatePasswordResponse { + updatePasswordNewPassword = newPassword + return try updatePasswordResult.get() + } + func updatePassword(newPassword: String) throws -> BitwardenSdk.UpdatePasswordResponse { updatePasswordNewPassword = newPassword return try updatePasswordResult.get() From 8a30fc9397a9c7ede0c3c3aaff09dd61c8c2ac60 Mon Sep 17 00:00:00 2001 From: Matt Czech Date: Thu, 18 Sep 2025 12:00:38 -0500 Subject: [PATCH 7/7] Update Package.resolved --- Bitwarden.xcworkspace/xcshareddata/swiftpm/Package.resolved | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bitwarden.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Bitwarden.xcworkspace/xcshareddata/swiftpm/Package.resolved index e7ece36fb3..507709a9af 100644 --- a/Bitwarden.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Bitwarden.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -123,7 +123,7 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/bitwarden/sdk-swift", "state" : { - "revision" : "bb36b4848c5006b4c14f53c07476d12e6f8708ef" + "revision" : "f14c06fd4f77b290dfd447aadd80a3bbc54da97c" } }, {