Find the Service Provider


You can get the service provider using CTTelephonyNetworkInfo and CTCarrier classes. Just do the following :
Add this headers :
#import <CoreTelephony/CTCarrier.h>
#import <CoreTelephony/CTTelephonyNetworkInfo.h>
And get service provider name :
CTTelephonyNetworkInfo *networkInfo = [[[CTTelephonyNetworkInfo alloc] init] autorelease];
NSString *serviceProvider = networkInfo.subscriberCellularProvider.carrierName;
This is a public API, you can use it on an app on the app store.
PS : Don't forget to link CoreTelephony Framework in your target.

Comments

Popular posts from this blog

Hacker Rank problem solution

How to Make REST api call in Objective-C.

Building and Running Python Scripts with Xcode