0

I am trying to get Country Code (telephone) Below code is giving me RegionCode "IN" But I want to return "+91" Anyone knows How I will get?

let locale = Locale.current
print("locale.regionCode",locale.regionCode!)

I am Looking for Apple Library.

Anup Gupta
  • 1,993
  • 2
  • 25
  • 40
  • @Anbu.karthik I am Looking for **Apple Library** Without using 3rd party library – Anup Gupta May 02 '18 at 07:29
  • The accepted answer to the question @Anbu.karhik linked to uses Core Telephony, which _is_ an Apple framework... – Charles Srstka May 02 '18 at 07:44
  • @CharlesSrstka **I am Using This code :::** `let networkInfo = CTTelephonyNetworkInfo() if let carrier = networkInfo.subscriberCellularProvider { print("carrier::",carrier) print("country code is: " + carrier.mobileCountryCode!); print("ISO country code is: " + carrier.isoCountryCode!); }` Output: `carrier:: CTCarrier (0x1c0240450) { Carrier name: [Carrier] Mobile Country Code: [404] Mobile Network Code:[44] ISO Country Code:[in] Allows VOIP? [YES] } – Anup Gupta May 02 '18 at 10:09
  • @CharlesSrstka I am not Getting the correct Country code. – Anup Gupta May 02 '18 at 10:10

0 Answers0