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

标签 ios objective-c core-telephony

我需要知道 iOS 返回的是 sim 运营商名称,还是网络运营商名称。

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

CTTelephonyNetworkInfo *networkInfo = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier* carrier = networkInfo.subscriberCellularProvider;
NSString* iOSCarrierName = carrier.carrierName;

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

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

关于ios - iOS 中返回的运营商名称是网络运营商名称还是 sim 运营商名称?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39979307/

相关文章:

ios - swift 中的 3D 立方体转换 View

ios - 快速消除宽高比限制

objective-c - NSMutableDictionary 用于巨大的 float 数据集

ios - 在 iOS 8.3 上获取 CellID、LAC 等

ios - 漫游时CTCarrier mobileNetworkCode会变吗?

ios - 是否可以在通话过程中从 iOS 应用程序向当前调用者发送短信?

ios - 如何公开我的 Struct 变量?

ios - UITableView 的细微差别

iphone - 是removeFromSuperview释放了对象吗?

ios - 横向模式下的 iPhone 应用程序,2008 系统