Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get the MCC and MNC on an iPhone

Tags:

iphone

As per the subject - is there an API to get the MCC/MNC on iPhone OS 2.1 or above?

like image 897
Airsource Ltd Avatar asked Mar 24 '09 17:03

Airsource Ltd


People also ask

What is MCC on iPhone?

The mobile country code (MCC) for the user's cellular service provider.

How do I find the cell ID for my iPhone?

*3001#12345#* and tap Call. Enter Field Mode. Field mode reveals many of the inner settings of your iPhone, specifically up-to-date network and cell information. Save this answer.

How do I change my network settings on my iPhone?

Go to Settings > Cellular, then turn Cellular Data on or off for any app (such as Maps) or service (such as Wi-Fi Assist) that can use cellular data. If a setting is off, iPhone uses only Wi-Fi for that service.


1 Answers

Added in iOS4

CTTelephonyNetworkInfo *netInfo = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier *carrier = [netInfo subscriberCellularProvider];
NSString *mcc = [carrier mobileCountryCode];
NSString *mnc = [carrier mobileNetworkCode];

http://developer.apple.com/library/ios/#Documentation/NetworkingInternet/Reference/CTCarrier/Reference/Reference.html

like image 192
koregan Avatar answered Sep 30 '22 14:09

koregan