iOS编程中是否有任何方法,功能或属性,我们可以通过它来识别SIM是预付费还是后付费?
我们能否以任何方式使用网络信息来区分前后?
- (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;
}
Run Code Online (Sandbox Code Playgroud)