Enable codable on swift bindings#1096
Conversation
|
🔍 SDK Breaking Change DetectionSDK Version:
Breaking change detection uses the build of the SDK from this branch, including any incompatibities pre-existing on or merged into this branch. Check the workflow logs to confirm. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1096 +/- ##
==========================================
+ Coverage 83.76% 83.83% +0.06%
==========================================
Files 432 433 +1
Lines 54750 54958 +208
==========================================
+ Hits 45862 46072 +210
+ Misses 8888 8886 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Is this something we could also enable for all other crates too? Seems pretty safe to add in general and it seems like it could also be beneficial for ios devs as they integrate the SDK more. Plus it might be a bit strange that some SDK items implement codable but others don't. |
|
@dani-garcia Sure, I think that makes sense. I just did the minimum amount of change to get KM's structs covered, and did not investigate the user-cases / appropriateness on other crates. |



🎟️ Tracking
bitwarden/ios#2648 (comment)
📔 Objective
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