我已经做了大部分事情来获得我的电话运营商。通过CTGetSignalStrength()
使用CTSIMSupportGetSIMStatus();
和SIM状态,我获得了信号强度。
但它总是返回 kCTSIMSupportSIMStatusReady 。现在,如果丢失了我的网络连接,它也会返回与 kCTSIMSupportSIMStatusReady 相同的状态。
那么,是否有任何方法可以通知iphone中的任何信号丢失?我的应用程序不需要互联网连接。
答案 0 :(得分:1)
您始终可以使用可达性(包含在AFNetworking中)
Reachability *reachability = [Reachability reachabilityForInternetConnection];
[reachability startNotifier];
NetworkStatus status = [reachability currentReachabilityStatus];
if(status == NotReachable)
{
// in this case there is no internet connection
}
else if (status == ReachableViaWiFi)
{
// in this case there is WiFi connection
}
else if (status == ReachableViaWWAN)
{
// in this case there 3G connection, WCDMA-umts
}
您需要检查WCDMA-UMTS,GPRS,GSM之间的区别吗?