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;
}
Rahul Verma
  • 688
  • 5
  • 17
  • 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. – Sami Kuhmonen Oct 12 '16 at 05:08

2 Answers2

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.

QuickPrototype
  • 833
  • 7
  • 18
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

Community
  • 1
  • 1
Saranjith
  • 11,242
  • 5
  • 69
  • 122
  • 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. – Rahul Verma Oct 12 '16 at 04:27
  • Please add the code you've used to get such information – Saranjith Oct 12 '16 at 04:43
  • - (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;} – Rahul Verma Oct 12 '16 at 05:03