Post

Replies

Boosts

Views

Activity

In-App purchase is showing different currency symbol for some countries
This is my code for getting the local price and currency symbol. private func getLocalCurrencyAndPrice(from product: SKProduct) -> (currency: String, price: Double) { //Get the currency let numberFormatter = NumberFormatter() numberFormatter.numberStyle = .currency numberFormatter.locale = product.priceLocale let priceString = numberFormatter.string(from: 0) let currencyString = ((priceString?.replacingOccurrences(of: "0", with: ""))?.replacingOccurrences(of: ".", with: ""))?.replacingOccurrences(of: ",", with: "") let trimmedCurrency = currencyString?.trimmingCharacters(in: .whitespacesAndNewlines) //Get the price let price = (product.price.doubleValue).roundToDecimal(2) return (currency: trimmedCurrency ?? "", price: price) } And this is how I am getting separate values: let currency = getLocalCurrencyAndPrice(from: product).currency let price = getLocalCurrencyAndPrice(from: product).price I have created sandbox users for different App Store regions from the App Store Connect. It shows almost all regional prices and currency symbols perfectly except for Indonesia, Taiwan & Korea. For Indonesia, on the "App Store Connect" It is showing Rp as their currency symbol: (Please ignore the differences in currency amount for now for all 3 countries) But on the application, it is showing IDR: For Taiwan, on the "App Store Connect" & on the application, It is showing $ as their currency symbol: But on the "Settings > App Store > Sandbox User > Manage" & "Purchase Pop-Up view", it is showing NT$ as their currency symbol: For Korea, on the "App Store Connect", "Settings > App Store > Sandbox User > Manage" & "Purchase Pop-Up view", It is showing ₩ as their currency symbol: But on the application, it is showing ₩ with a double line: Why these mismatches are showing while I am getting the value from the same source? What have I done wrongly? Question link of Stackoverflow
1
0
1.3k
Jul ’22
Proper way to check Auto Renewable subscription cancelation (From Apple support), turn off Auto Renewing and change subscription scheme
In my auto renewable subscription, I am always checking expires_date of latest_receipt_info from my "validation receipt". If the expires_date is greater than my current time then I am giving my users all the premium facilities of my application, if not then I bring him to the purchase view controller. Now my concern is: What if user cancel his Auto Renewable subscription from apple support? What if he turns off the auto renewing subscription of my application? What If user upgrade from one subscription to another subscription (Either upgrade or downgrade) In the above three cases should I do some additional checking besides comparing expires_date with current date?
0
0
365
Feb ’22