As per the subject - is there an API to get the MCC/MNC on iPhone OS 2.1 or above?
Asked
Active
Viewed 1.9k times
3 Answers
31
Added in iOS4
CTTelephonyNetworkInfo *netInfo = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier *carrier = [netInfo subscriberCellularProvider];
NSString *mcc = [carrier mobileCountryCode];
NSString *mnc = [carrier mobileNetworkCode];
-
2Don't forget to #import
and include the CoreTelephony Framework – BadPirate Dec 17 '11 at 00:29
1
No, mobile network information is not available through the API. If you're looking for a unique device ID, take a look at UIDevice's uniqueIdentifer method; if you're looking for the country the device is in, you need Location Services; if you want a good indication of the user's home region, take a look at NSLocale; for anything else, just ask the user.

Becca Royal-Gordon
- 17,541
- 7
- 56
- 91
-
Thanks for the response - sadly Location Services requires asking the user, in the sense that they get a popup asking if it's ok. – Airsource Ltd Mar 25 '09 at 16:17
0
I think you could just get the phone number of the iPhone and parse it out for the country code.

Community
- 1
- 1

Phill Pafford
- 83,471
- 91
- 263
- 383