How to detect carrier is available or not in iphone?

1.4k Views Asked by At

I have done most of all the things to get my phone carrier availability. I got signal strength by using CTGetSignalStrength() and SIM status by CTSIMSupportGetSIMStatus();.

But it always returns kCTSIMSupportSIMStatusReady. Now if lost my network connection then it also returns same status as kCTSIMSupportSIMStatusReady.

So, is there any method to get notify for lost of any signal in iphone? My app doesn't require internet connections.

1

There are 1 best solutions below

2
On BEST ANSWER

You can always use Reachability (included in 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
}

Do you need to check the difference between WCDMA-UMTS, GPRS, GSM?