Question

Users App Store local region and Locale.current device setting discrepency

  • 10 November 2022
  • 1 reply
  • 24 views

Badge

Hey,

I’m formatting price strings that are returned from RevenueCat (localizedPriceString) in my iOS build but I also need access to the users app store region code to format the currency to and from a floating point number while keeping the correct currency formatting before and after.

The number formatter in xcode uses either ‘Locale.current’ (which the user can change in the phone settings leading to possible incorrect formatting) or a manually specified region code. I need the app store region code to ensure the values that I format are returned in the correct currency format.

Is there anyway RC can supply this?

Cheers,

Matt.


1 reply

Userlevel 4
Badge +9

Hey Matt,

Will getting the SKStoreFront from the RevenueCat SDK work? The store front object contains a country code that you may be able to use.

Reply