iOS中返回的运营商名称是网络运营商名称还是sim运营商名称?

Dri*_*ico 2 objective-c ios core-telephony

我需要知道iOS是否返回sim运营商名称或网络运营商名称.

在iOS中,我通过以下方式访问运营商信息:

CTTelephonyNetworkInfo *networkInfo = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier* carrier = networkInfo.subscriberCellularProvider;
NSString* iOSCarrierName = carrier.carrierName;
Run Code Online (Sandbox Code Playgroud)

在Android中,有两种显式方法可以获取其中一种:

import android.telephony.TelephonyManager;
String networkCarrierName = telephonyManager.getNetworkOperatorName();
String simCarrierName = telephonyManager.getSimOperatorName()
Run Code Online (Sandbox Code Playgroud)

Sud*_*udo 6

文件说,subscriberCellularProvider

CTCarrier对象,包含有关用户的家庭蜂窝服务提供商的信息,即用户拥有帐户的提供商.

所以它绝对是sim运营商名称.更多信息