Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 843
Suchi Avatar asked Nov 17 '11 02:11

Suchi


1 Answers

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];
like image 64
Louie Avatar answered Sep 28 '22 08:09

Louie