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)
| 归档时间: |
|
| 查看次数: |
1305 次 |
| 最近记录: |