0

At the moment I have an app on the App Store, which is only available in the U.K., this is because in the U.K., U.S. and the E.U. use different measurements (imperial and metric).

So what I want to know, how would I tell what country a user is from, and in turn know which conversion to use?

Maybe an if statement for Locale? If that's even possible, or an option where the user selects what country they are from (and then save it so they don't have to input every time they go on the app?)

Many thanks.

TsGDev
  • 97
  • 9
  • This sounds like a problem that likely has already been solved many times over! I don't know the answer, but would start by Googling `ios swift get current locale` – Pekka Jul 27 '17 at 16:43
  • Also a search for `ios swift get user metric system` seems to get good results – Pekka Jul 27 '17 at 16:44
  • 1
    Amazing thank you so much, been searching for ages, but was looking into stupidly long ways into sorting it! Cheers – TsGDev Jul 27 '17 at 17:08
  • This is kind of a duplicated question. Here's the answer: https://stackoverflow.com/questions/39596238/how-to-get-country-code-using-nslocale-in-swift-3 – Mauricio Chirino Jul 27 '17 at 19:08

0 Answers0