Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/102.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios CoreTelephony框架在iPhone中返回404作为MCC(移动国家代码)_Ios_Iphone_Core Telephony_Mobile Country Code - Fatal编程技术网

Ios CoreTelephony框架在iPhone中返回404作为MCC(移动国家代码)

Ios CoreTelephony框架在iPhone中返回404作为MCC(移动国家代码),ios,iphone,core-telephony,mobile-country-code,Ios,Iphone,Core Telephony,Mobile Country Code,我使用下面的代码片段查找用户iPhone的MCC(移动国家代码)。运营商名称、国际标准化组织代码和跨国公司等详细信息进展顺利,但MCC始终为404,而不是+01(或美国)或+91(印度) 我的手机里有一张工作正常的SIM卡,我的手机是解锁的。 我在这里做错了什么?MCC不是您所期望的手机的国家前缀,而是ITU-T建议E.212“移动国家或地理区域代码列表”中定义的移动国家代码 在你的例子中,404是-印度。 您可以在以下位置查看列表:MCC不是e.164国家代码。这是一个e.212代码——404

我使用下面的代码片段查找用户iPhone的MCC(移动国家代码)。运营商名称、国际标准化组织代码和跨国公司等详细信息进展顺利,但MCC始终为404,而不是+01(或美国)或+91(印度)

我的手机里有一张工作正常的SIM卡,我的手机是解锁的。
我在这里做错了什么?

MCC不是您所期望的手机的国家前缀,而是ITU-T建议E.212“移动国家或地理区域代码列表”中定义的移动国家代码

在你的例子中,404是-印度。
您可以在以下位置查看列表:

MCC不是e.164国家代码。这是一个e.212代码——404是印度。谢谢你提供的信息,直到现在我才知道这一点。。有没有办法在iOS中获取国家前缀。这会有很大的帮助。我不知道(那些会通过应用商店审查的)
    CTTelephonyNetworkInfo *networkInfo = [[CTTelephonyNetworkInfo alloc] init];
    CTCarrier *carrier = [networkInfo subscriberCellularProvider];


// Get carrier name
NSString *carrierName = [carrier carrierName];
if (carrierName != nil)
    NSLog(@"Carrier: %@", carrierName);

// Get mobile country code
NSString *mcc = [carrier mobileCountryCode];
if (mcc != nil)
    NSLog(@"Mobile Country Code (MCC): %@", mcc);

// Get mobile network code
NSString *mnc = [carrier mobileNetworkCode];

if (mnc != nil)
    NSLog(@"Mobile Network Code (MNC): %@", mnc);
NSString *code = [carrier isoCountryCode];

NSLog(@"isoCountryCode (iso): %@", code);