问题
I need to convert SKProduct local price to US Dollar. That means, SKProduct give me local based currency. But i need to show US Dollar rate in every country.
回答1:
Try these libraries DDUnitConverter and MGCurrencyExchanger or try this code
SKProduct *product = [self.products objectAtIndex:indexPath.row];
NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init];
[formatter setNumberStyle:NSNumberFormatterCurrencyStyle];
[formatter setLocale:product.priceLocale];
currencyString = [formatter stringFromNumber:product.price];`
来源:https://stackoverflow.com/questions/46658966/how-to-get-skproduct-local-price-in-us-dollar