Is there any way of getting the mnc and mcc numbers on an iPhone?
Asked
Active
Viewed 5,197 times
2 Answers
6
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];
-
Thanks. The question was asked in 3.2 time so this wasn't a solution for my first problem. But that was over a year ago so if I don't have to be compatible with old devices, this is the best solution. – Johan Mar 21 '11 at 06:44
-
1In order to retrieve the CTCarrie your need the Network info first: `CTTelephonyNetworkInfo *networkInfo = [[CTTelephonyNetworkInfo alloc] init]; CTCarrier *carrier = [networkInfo subscriberCellularProvider];`. The code in the answer will return nil for both. – Felix Lamouroux Dec 05 '13 at 15:04
-
why is this marked as the correct answer? My country code for my phone number is +1, I am not getting that using this solution... – zumzum Aug 02 '14 at 13:49
-
@zumzum The "country code" you're looking for and the standardized MCC is not the same thing... – Scorchio Oct 03 '14 at 14:30
1
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,

holtmann
- 6,043
- 32
- 44
-
-
As far as I know there isn't an official method to do this at the moment. – holtmann Jul 05 '11 at 06:35