Reputation: 1
Is there a way to get the name of the current carrier of the phone inside a Cocoa Touch application?
Upvotes: 0
Views: 551
Reputation: 3583
You can from iOS4+
First add the CoreTelephony.framework to your project.
Then import the following to the top of your .h or .m file:
#import <CoreTelephony/CTTelephonyNetworkInfo.h>
#import <CoreTelephony/CTCarrier.h>
Use sample:
CTTelephonyNetworkInfo *netinfo = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier *carrier = [netinfo subscriberCellularProvider];
NSLog(@"Carrier name:%@", [carrier carrierName]);
Upvotes: 2