【发布时间】:2017-02-20 02:47:54
【问题描述】:
我需要知道 iOS 返回的是 sim 运营商名称,还是网络运营商名称。
在 iOS 中,我通过以下方式访问运营商信息:
CTTelephonyNetworkInfo *networkInfo = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier* carrier = networkInfo.subscriberCellularProvider;
NSString* iOSCarrierName = carrier.carrierName;
在 Android 中,有 2 种显式方法可以获取其中一个:
import android.telephony.TelephonyManager;
String networkCarrierName = telephonyManager.getNetworkOperatorName();
String simCarrierName = telephonyManager.getSimOperatorName()
【问题讨论】:
标签: ios objective-c core-telephony