iPhone - how to determine carrier of the device (AT&T, Verizon, etc?)

Suchi picture Suchi · Nov 17, 2011 · Viewed 8.7k times · Source

Is there a way to get information about the carrier of iPhones programmatically?

Answer

Louie picture Louie · Nov 17, 2011

1st Import #import <CoreTelephony/CTTelephonyNetworkInfo.h> as well as #import <CoreTelephony/CTCarrier.h> (make sure you have the CoreTelephone.framework installed too).

CTTelephonyNetworkInfo *phoneInfo = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier *phoneCarrier = [phoneInfo subscriberCellularProvider];
NSLog(@"Carrier = %@", [phoneCarrier carrierName]);
[phoneInfo release];