Getting country calling prefix

后端 未结 10 1483
耶瑟儿~
耶瑟儿~ 2020-12-28 21:04

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

10条回答
  •  心在旅途
    2020-12-28 22:05

    The NSLocaleCountryCode is the country code defined in ISO-3166, not the calling code. You need to find the calling code elsewhere.

    See Link for a complete list of ISO3166 -> calling code.

提交回复
热议问题