I have tried this code:
CTTelephonyNetworkInfo *netinfo = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier *carrier = [netinfo subscriberCellularProvider];
if(carrier != nil)
{
NSString *mnc = [carrier mobileNetworkCode];
NSLog(@" mnc is %@ ", mnc);
}
It works as I expected when the carrier is AT&T. I got mnc is 410.
However, when the carrier is Verizon. I got "mnc is VZW". Is this a correct behavior of the API? Any other way that I can obtain the numeric mobile network code?
note: Apple's documentation says the method should return...
A read-only NSString object that represents the numeric mobile network code for the user’s cellular service provider.
I'm not sure what I have done wrong or something's wrong with my phone :-)
Not sure what model u use. I also got VZW when testing with iPhone 4 (iOS 6). AFAIK, it's the only way to get MNC.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With