Reputation:
I have a recent requirement to find the Service Provider of the Mobile from within the iOS App. I am not very sure if this is possible.
Can someone please help me with this.
Also, if possible, please do let me know if it will clear AppStore Review.
Thanks
Upvotes: 4
Views: 840
Reputation: 2107
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.
Upvotes: 3