When user downloads the application from app store, I want to find out from which app store user has downloaded that application.
AFAIK there’s no supported way to do this.
To use the current locale of the user to detect in which country they are …
Don’t do that. There’s no guaranteed relationship between between language (or locale) and the App Store country. For example, when visiting my family in Australia I may need to switch to the AU store to get AU-specific apps, but my device’s language and locale will still be based on where I live.
You may get recommendations to do this by looking at undocumented fields in the app’s App Store receipt. That’s also a bad idea. Anything receipt field that’s not explicitly documented in the Receipt Validation Programming Guide is off limits.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"