Getting country calling prefix
- by Telkitty
Just wondering whether there are easy ways to retrieve country calling code from a user's phone.
For example, my app would like to pre-fill country calling code for the users. If the user is located in the U.S. the code +1 will be returned, +83 for China, +61 for Australia etc.
I had a look around but I could only see:
NSLocale *locale = [NSLocale currentLocale];
NSString *countryCode = [locale objectForKey: NSLocaleCountryCnode];
Which returns the abbreviation for the country code, not the calling prefix?
Help is appreciated!