I am using Reachability v2.0 in my app.
I have a valid internet connection and able to browse google page in web browser.
When i am trying to test the reachability status in my App, its always showing “Host is not Reachable”.
NSString *host = @"http://www.google.co.in";
NSLog(@"host : %@", host);
Reachability *hostReach = [Reachability reachabilityWithHostName:host];
if([hostReach currentReachabilityStatus] == NotReachable) {
NSLog(@"Host is not Reachable");
} else {
NSLog(@"Host is reachable");
}
What is wrong in the above code ??
Try implementing this on any function that requires internet connection!