purchases-ios icon indicating copy to clipboard operation
purchases-ios copied to clipboard

Make getMetadataValue with default value decodable

Open nyeu opened this issue 1 year ago • 1 comments

Motivation

I think we'll always want to have a Decodable value when trying to get a value from metadata. This also makes it go with the other function getMetadataValue<T: Decodable>(for key: String) -> T? but with the difference to provide a fallback value. We are not duplicating code and avoids having the crash issue we had before.

Checklist

  • [ ] If applicable, unit tests

nyeu avatar Dec 09 '24 13:12 nyeu

1 Error
:no_entry_sign: Label the PR using one of the change type labels. If you are not sure which label to use, choose pr:other.
Label Description
pr:feat A new feature. Use along with pr:breaking to force a major release.
pr:fix A bug fix. Use along with pr:force_minor to force a minor release.
pr:other Other changes. Catch-all for anything that doesn't fit the above categories. Releases that only contain this label will not be released. Use along with pr:force_patch, or pr:force_minor to force a patch or minor release.
pr:RevenueCatUI Use along any other tag to mark a PR that only contains RevenueCatUI changes
pr:next_release Preparing a new release
pr:dependencies Updating a dependency
pr:phc_dependencies Updating purchases-hybrid-common dependency

Generated by :no_entry_sign: Danger

RevenueCat-Danger-Bot avatar Dec 09 '24 13:12 RevenueCat-Danger-Bot