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

Is the carrier name returned in iOS a network carrier name or a sim carrier name?

我需要知道 iOS returns 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()

documentation表示subscriberCellularProvider

A CTCarrier object that contains information about the user’s home cellular service provider—that is, the provider with whom the user has an account.

所以这绝对是sim运营商的名字。 More info