In my project I am using Reachability class provided by Apple. When there is no internet connection, I am displaying an alert message. Everything is working fine, when I test it on the simulator, but when am running it on iPad, the alert message is not shown when there is no internet.
I am running the code on iOS 5.0.
Any help would be appreciated.
EDIT:
-(BOOL)isInternetConnectionPresent{
Reachability *objReachability = [Reachability reachabilityForInternetConnection];
NetworkStatus internetStatus = [objReachability currentReachabilityStatus];
if(internetStatus != NotReachable)
{
return YES;
}
return NO;
}
UPDATE:
Used NSLog to debug. Seems there was some problem with WWAN, even when there was no SIM card. Restarted the iPad & switched OFF & ON the Wi Fi again. Now it works fine. Thanks for the help guys.
You have to check all the NetworkStatus and Cross Check the device Wifi Connection status again
Example:
In My case the following code snippet is working perfectly with iOS 5. Here i am checking internet connectivity with WIFI.
}
------------------------ now with following line of code you can check.
}