How to get Mobile Country and Network code on an iPhone
-
23-09-2019 - |
Question
Is there any way of getting the mnc and mcc numbers on an iPhone?
Solution
You need the CoreTelephony framework
CTTelephonyNetworkInfo *networkInfo = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier *carrier = [networkInfo subscriberCellularProvider];
to get MNC,
NSString *mnc = [carrier mobileNetworkCode];
to get MCC,
NSString *mcc = [carrier mobileCountryCode];
OTHER TIPS
You can use the methods of the CTCarrier class to retrieve Country and network code. However this is only for the home provider (=SIM Card) and not the provider the phone is currently booked in,
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow