开发者

How to get Mobile Country and Network code on an iPhone

开发者 https://www.devze.com 2022-12-25 14:14 出处:网络
Is there any way of开发者_开发问答 getting the mnc and mcc numbers on an iPhone?You need the CoreTelephony framework

Is there any way of开发者_开发问答 getting the mnc and mcc numbers on an iPhone?


You need the CoreTelephony framework

CTTelephonyNetworkInfo *networkInfo = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier *carrier = [networkInfo subscriberCellularProvider];

to get MNC,

NSString *mnc = [carrier mobileNetworkCode];

to get MCC,

NSString *mcc = [carrier mobileCountryCode];


You can use the methods of the CTCarrier class to retrieve Country and network code. However this is only for the home provider (=SIM Card) and not the provider the phone is currently booked in,

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号