iOS how to find country code of the user's phone number?
I have an app that needs to figure out the country code of the phone number the user has. My understanding is that I can't just get the phone number of the user, but, is there a way for example if I have a US phone number to get the country code +1? I have found multiple answers that claim that using core telephony you can get the country code "+1" but I tried a few and none of them work. I tried this: CTTelephonyNetworkInfo *network_Info = [CTTelephonyNetworkInfo new]; CTCarrier *carrier = network_Info.subscriberCellularProvider; NSString *mnc = [carrier mobileNetworkCode]; NSString *mcc =