Is there a way to know the cell carrier on an iPhone programatically ?
** update **
I am looking for the carrier name which the iPhone is connected to.
Is there a way to know the cell carrier on an iPhone programatically ?
** update **
I am looking for the carrier name which the iPhone is connected to.
There is no public API for getting the carrier name. If you don't need to publish on the App Store you could look at using private api's.
VVCarrierParameters.h
in the VisualVoiceMail package seems to have a carrierServiceName
class method that might be what you need. Drop that header in your project and call [VVCarrierParameters carrierServiceName]
.
Note your app will most likely be rejected if you do this.
There is a such way however it's only available on iOS 4 so you won't be able to use it on previous versions. And this probably breaks your backward compatibility too.
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];