I am working on an iPad app which requires frequent connections to a publicly hosted webserver. I have a Wi-Fi network which requires authentication and gets timed out after 30 minutes of logging in.
I am using the Reachability class but I am not able to get the Network Awareness that I want in my app. The Reachability class takes care whenever the user connects/disconnects from the Wi-Fi network, but in case of authentication time out, the Reachability class is giving me wrong results.
Reachability *internetReach=[Reachability reachabilityWithHostName:@"www.google.com"];
if ([internetReach currentReachabilityStatus] == NotReachable) {
[self alertMessage:@"Wi-Fi connection not available"];
}
I do not get the intended alert message when the Wi-Fi has timed out. What I need is that my app should recognize that Wi-Fi has been timed out and it should bring up the Safari Wi-Fi authentication sheet automatically for the user (like it happens in App Store, YouTube, etc.)