Skip to content

Commit 0b29247

Browse files
authored
Enable codable on swift bindings (#1096)
## 🎟️ Tracking <!-- Paste the link to the Jira or GitHub issue or otherwise describe / point to where this change is coming from. --> bitwarden/ios#2648 (comment) ## 📔 Objective <!-- Describe what the purpose of this PR is, for example what bug you're fixing or new feature you're adding. --> As per mobile's request, we are enabling codable for the uniffi bindings so that they can directly serialize the structs they get returned from the SDK without having to maintain a seprate copy. Maintaining a separate copy in the past has lead to bugs / incorrect state being saved (bitwarden/ios#2303). This is safer than mobiles current approach of persisting server request / response models, which do not match what the SDK returns. ## 🚨 Breaking Changes <!-- Does this PR introduce any breaking changes? If so, please describe the impact and migration path for clients. If you're unsure, the automated TypeScript compatibility check will run when you open/update this PR and provide feedback. For breaking changes: 1. Describe what changed in the client interface 2. Explain why the change was necessary 3. Provide migration steps for client developers 4. Link to any paired client PRs if needed Otherwise, you can remove this section. -->
1 parent 10af2ea commit 0b29247

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

crates/bitwarden-core/uniffi.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ omit_checksums = true
99
ffi_module_name = "BitwardenCoreFFI"
1010
module_name = "BitwardenCore"
1111
generate_immutable_records = true
12+
generate_codable_conformance = true

crates/bitwarden-crypto/uniffi.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ omit_checksums = true
99
ffi_module_name = "BitwardenCryptoFFI"
1010
module_name = "BitwardenCrypto"
1111
generate_immutable_records = true
12+
generate_codable_conformance = true

0 commit comments

Comments
 (0)