As per the subject - is there an API to get the MCC/MNC on iPhone OS 2.1 or above?
+1
A:
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.
Brent Royal-Gordon
2009-03-24 18:05:56
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
2009-03-25 16:17:32
A:
I think you could just get the phone number of the iPhone and parse it out for the country code.
Phill Pafford
2009-11-04 13:05:07
A:
Added in iOS4
CTTelephonyNetworkInfo *netInfo = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier *carrier = [netInfo subscriberCellularProvider];
NSString *mcc = [carrier mobileCountryCode];
NSString *mnc = [carrier mobileNetworkCode];
koregan
2010-07-24 19:56:47