简体   繁体   English

我们可以使用iOS检测SIM是预付费还是后付费?

[英]Can we detect whether a SIM is prepaid or postpaid using iOS?

Is there any method, function or property in iOS programming through which we can identify whether the SIM is prepaid or postpaid? iOS编程中是否有任何方法,功能或属性,我们可以通过它来识别SIM是预付费还是后付费?

Can we use network information in any way to distinguish betweem pre and post? 我们能否以任何方式使用网络信息来区分前后?

- (NSDictionary *)fetchSSIDInformation { 
       NSArray *interfaceNames = CFBridgingRelease(CNCopySupportedInterfaces());
       NSLog(@"%s: Supported interfaces: %@", func, interfaceNames);
       NSDictionary *SSIDInfo; 
       for (NSString *interfaceName in interfaceNames)
          { 
            SSIDInfo = CFBridgingRelease( CNCopyCurrentNetworkInfo((bridge CFStringRef)interfaceName)); 
            NSLog(@"%s: %@ => %@", __func, interfaceName, SSIDInfo); 
            BOOL isNotEmpty = (SSIDInfo.count > 0); 
            if (isNotEmpty) { break; } 
          }

      return SSIDInfo;
}

No, SIM cards or any network information available to the device will have no indication of subscriber type. 不,SIM卡或设备可用的任何网络信息都不会显示用户类型。 The only important information the SIM holds is the International Mobile Subscriber Identity (IMSI) which uniquely identify's the SIM to the operator. SIM保存的唯一重要信息是国际移动用户识别码(IMSI),它唯一地识别运营商的SIM卡。

The Network operator will then associate a "subscriber type" (postpaid,prepaid,converged,hybrid) on the operators side (stored in the HLR) which will affect how billing is handled. 然后,网络运营商将在运营商侧(存储在HLR中)关联“订户类型”(后付费,预付费,融合,混合),这将影响计费的处理方式。

Exposing this information from the HLR publicly is generally never done however Operators my have a portal for service providers that could expose such a query. 从HLR公开公开此信息通常从未完成,但操作员我有一个服务提供商的门户,可以公开这样的查询。

I don't think you can, Apple does not expose any information regarding the sim. 我不认为你可以,Apple不公开有关SIM卡的任何信息。 You may able to do, but apple will not consider your app in Appstore. 您可以这样做,但Apple不会在Appstore中考虑您的应用。 Read Apple Developer Document 阅读Apple Developer Document

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM