Can we detect whether a SIM is prepaid or postpaid using iOS?
Asked Answered
A

2

9

Is there any method, function or property in iOS programming through which we can identify whether the SIM is prepaid or postpaid?

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;
}
Alfrediaalfredo answered 12/10, 2016 at 4:15 Comment(1)
I don't think the SIM is in any way different, neither is the network. It's all about billing so the device doesn't know anything.Nap
A
1

No, SIM cards or any network information available to the device will have no indication of subscriber type. The only important information the SIM holds is the International Mobile Subscriber Identity (IMSI) which uniquely identify's the SIM to the operator.

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.

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.

Avidin answered 28/10, 2016 at 21:35 Comment(0)
I
0

I don't think you can, Apple does not expose any information regarding the sim. You may able to do, but apple will not consider your app in Appstore. Read Apple Developer Document

Icebreaker answered 12/10, 2016 at 4:24 Comment(3)
Yes, I did some R&D for the same and it is not possible for now, Just wondering if we got some related information in device network information.Alfrediaalfredo
Please add the code you've used to get such informationIcebreaker
- (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;}Alfrediaalfredo

© 2022 - 2024 — McMap. All rights reserved.