Retrieving Carrier Name from iPhone programmatically

carrier, core-telephony, ios, networking

Solution

In iOS 4, the CoreTelephony framework is useable, here's a snippet to get the carrier name:

CTTelephonyNetworkInfo *netinfo = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier *carrier = [netinfo subscriberCellularProvider];
NSLog(@"Carrier Name: %@", [carrier carrierName]);
[netinfo release];

Link against CoreTelephony and include in your headers:

#import <CoreTelephony/CTTelephonyNetworkInfo.h>
#import <CoreTelephony/CTCarrier.h>

Problem

Is there a way to know the cell carrier on an iPhone programmatically? I am looking for the carrier name which the iPhone is connected to.

Original source

Related problems