How to detect Apple AppStore Country Code on different iOS versions?

259 Views Asked by At

In our app we need to detect the country of the of the user's app store.

We are doing this with:

On iOS 13+ https://developer.apple.com/documentation/storekit/skstorefront/3182435-countrycode On iOS < 13 https://developer.apple.com/documentation/storekit/skproduct/1506145-pricelocale

I have a few questions about these two properties:

  • Are there any situations where the country code returned from these two properties would be different?
  • Sometimes SKStoreFront.countryCode returns nil, why would that be?
  • If SKStoreFront.countryCode returns nil, is it safe to use priceLocale as a fallback? Or would this also be nil?

Thank you

0

There are 0 best solutions below