IOS programming - how to find out from which application (in the country) the application was downloaded

As you know, iOS developers, you can only set one price level for your apps and products in the app in the app store. However, you can (theoretically) publish it as separate applications in different countries with different prices. I would like to do the same with the in-app products of the same application - identify alternative products in the application and control their visibility in the application depending on the user country. I do not want to use NSLocale or NSTimeZone, because they can be changed in the settings. I want to know the country to which the application / user store is connected.

For example, “I want to offer an auto-renewal subscription for most users, but I know that auto-renewal subscriptions are not available in the Israeli app store, so I want to show a non-renewing subscription exclusively to Israeli users, and not show them auto-renewal. Is there a reliable way to achieve this?

Thanks Avi

+6
source share
1 answer

After studying further, I found that when requesting products in the store, SKProduct returns with the priceLocale property, which consists of a country code and a currency code. The priceLocale country code seems to be consistent with the custom application store.

To summarize, following these steps will produce a result, however in a slow and difficult way:

  • Define an element in the application;
  • Request this item in your application;
  • Define user country according to [product.priceLocale objectForKey: NSLocaleCountryCode];
  • Show the user the appropriate products supported by your application in your country.
+5
source

Source: https://habr.com/ru/post/948930/


All Articles