I am trying to get the country code from iPhone user. I am not sure is there any information about the country and how some applications (like Viber) suggest dial code.
I got this far:
let currentLocale = NSLocale.currentLocale()
let a = currentLocale.localeIdentifier
I tested this on simulator and it returns "en_US". Can someone advice how should I get dial code for a country based on this (or at least country code, which I will send to server to get dial code).
Thanks!