For analysis and data collection, I want to get the SKProduct price in dollars.
The basic code that I use to show the user the price:
_priceFormatter = [[NSNumberFormatter alloc] init]; [_priceFormatter setFormatterBehavior:NSNumberFormatterBehavior10_4]; [_priceFormatter setNumberStyle:NSNumberFormatterCurrencyStyle]; [_priceFormatter setLocale:inAppProduct.priceLocale]; inAppItemString = [_priceFormatter stringFromNumber:inAppProduct.price];
This code gives me the real price that the user must pay with his local coin.
I tried setting local as en_US, but I got the same price as before, with $ :) This is what I changed for this:
NSLocale *usLocale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"]; [_priceFormatter setLocale:usLocale];
Any idea how to get the price in US dollars?
source share