How to retrieve Carrier information ?
CTTelephonyNetworkInfo* telephonyNetworkInfo = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier* carrierObject = [telephonyNetworkInfo subscriberCellularProvider];
string = [[NSString alloc] initWithFormat:@"Allow VoIP: %d\nCarrier Name: %@\nISO Country Code: %@\nMobile Country Code: %@\nMobile Network Code: %@", carrierObject.allowsVOIP, carrierObject.carrierName, carrierObject.isoCountryCode, carrierObject.mobileCountryCode, carrierObject.mobileNetworkCode];
NSLog(@"%Carrier information: \n%@", string);
(Original Sources: http://www.jesuisdeveloppeuriphone.com/2012/08/24/coretelephony-how-to-retrieve-carrier-information/)
Written by Vincent Saluzzo
Related protips
1 Response
If you only need to get some info about your carrier outside any app, you can just dial 3001#12345#. I wrote about it here http://milancermak.posterous.com/getting-the-cellular-network-information-on-y
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Xcode
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#