-1

Is it possible to have a program built for two countries and change the appearance and language of the program due to the SIM card code on the device?

Behzad Moulodi
  • 147
  • 2
  • 11
  • You can simply in the first ask for his mobile number to verify his login/register, you can check the prefix of the number if it was valid and swizzle whatever you need based on that . – Mohmmad S Sep 25 '19 at 08:26
  • 1
    You get current country code of device use of "Locale" in swift and set custom ui based on country selection. Or access of simcard contact number and identified the country and set UI regarding it. – kishor soneji Sep 25 '19 at 08:30

1 Answers1

1

Yes. You can check user's language for this.

Get the language key of localization:

let preferredLanguage = NSLocale.preferredLanguages.first

Also you can get country code.

Also you can do it using user's location, but I think it is a bad approach. Location requires a lof of battery.

Vladislav Markov
  • 587
  • 1
  • 5
  • 19