Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get ios app store price in correct currency for price tier and location

Tags:

ios

storekit

Let's say I have a huge catalog of products setup for in app purchase, at various price tiers. The products will be for sale in multiple territories, and hence require the price to be displayed in the correct currency.

Is there a way I can request (from itunes) the monetary value for a given price tier in a given country (the users itunes account country of course)?

At present the only way I can see to do this is to send a product info request to apple for the first occurrence of a product for a given price tier and then store this result.

As a side question: I know I could use my server to return the price for a currency/tier combo, but I'm concerned about the possibility that Apple tweaks in-app prices. Is there any chance that could happen?

like image 835
BoomShaka Avatar asked Oct 28 '25 11:10

BoomShaka


1 Answers

extension SKProduct {
    var localizedPriceString: String? {
        let formatter = NumberFormatter()
        formatter.formatterBehavior = .behavior10_4
        formatter.numberStyle = .currency
        formatter.locale = priceLocale
        return formatter.string(from: price)
    }
}
like image 101
mxcl Avatar answered Oct 31 '25 03:10

mxcl



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!