RevenueCat / purchases-kmp

RevenueCat SDK for Kotlin Multiplatform
MIT License
70 stars 2 forks source link

Greatly simplifies how Price.amountMicros is determined on iOS. #172

Closed JayShortway closed 1 week ago

JayShortway commented 1 week ago

Since PHC did not expose the actual price amount on iOS, we were reconstructing it by parsing the formatted price string. Besides being very brittle, this might also be the cause of https://github.com/RevenueCat/purchases-kmp/issues/161, as we return 0 if the price formatter is null. The meat of this PR is in Price.ios.kt.

Note: this is ready for review. It's just dependent on a few external factors:

Blockers

tonidero commented 1 week ago

I just merged the PHC bump in #174, so we should rebase this PR @JayShortway

JayShortway commented 1 week ago

@tonidero Thanks, done!