Skip to content

Instantly share code, notes, and snippets.

@novinfard
Created September 10, 2018 10:26
Show Gist options
  • Save novinfard/74321893265d62dc963b65b47bed92b9 to your computer and use it in GitHub Desktop.
Save novinfard/74321893265d62dc963b65b47bed92b9 to your computer and use it in GitHub Desktop.
[get Mobile Carrier name in iOS]
+ (NSString *) getCarrierName
{
CTTelephonyNetworkInfo *netinfo = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier *carrier = [netinfo subscriberCellularProvider];
NSString *carrierName = [carrier carrierName];
if (carrierName == nil) {
return @"unknown";
}
return carrierName;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment