Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

电话卡类型(GSM 、CDMA、SIP) #2

Open
MrCaiWH opened this issue Nov 7, 2019 · 1 comment
Open

电话卡类型(GSM 、CDMA、SIP) #2

MrCaiWH opened this issue Nov 7, 2019 · 1 comment

Comments

@MrCaiWH
Copy link

MrCaiWH commented Nov 7, 2019

这个可以取到吗

@muzipiao
Copy link
Owner

muzipiao commented Nov 7, 2019

可通过获取 MNC 来区分,中国移动系统使用00、02、04、07,中国联通GSM系统使用01、06、09,中国电信CDMA系统使用03、05、电信4G使用11,中国铁通系统使用20。
获取方式:

#import <CoreTelephony/CTCarrier.h>
#import <CoreTelephony/CTTelephonyNetworkInfo.h>

CTTelephonyNetworkInfo *info = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier *carrier = [info subscriberCellularProvider];
NSString *mnc = [carrier mobileNetworkCode];

参考:百科

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants