I have an iOS app using In-App-Purchase that caters to an international audience, so I expect payments in different currencies (USD, EUR, CNY, ... you know them from the AppStore Pricing Matrix). Of course I would like to show the items for purchase with the user's local currency, but I don't really know how.
Using the region or language of a user seems like a bad indicator, as the currency depends on the region of the AppStore account the user is using and not on the device settings.
How can I find out which currency a user will pay in?
An in-app purchase is any fee an app may ask for. Many in-app purchases are optional or give users additional features. Others serve as subscriptions and require users to sign up and pay a fee to use the app – often after an initial free trial.
Check with your app store And that means they'll have records of any recurring payments. Reviewing these records lets you quickly see how much you've been paying and whether you should consider canceling any given subscription.
Once you have SKProduct object fetched you can construct its localized price from price and priceLocale properties. Here's copy-paste from apple docs how to do that:
NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init];
[numberFormatter setFormatterBehavior:NSNumberFormatterBehavior10_4];
[numberFormatter setNumberStyle:NSNumberFormatterCurrencyStyle];
[numberFormatter setLocale:product.priceLocale];
NSString *formattedString = [numberFormatter stringFromNumber:product.price];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With