Downloaded Reachability from Apple, using this method to check for an active connection:
-(BOOL)isReachable{
Reachability *r = [Reachability reachabilityWit
Another complete answer:
-(BOOL) isReachable:(NSString *)url
{
//Retrieve the host name by given url address.
NSString *hostName = [[NSURL URLWithString:url] host];
Reachability *r = [Reachability reachabilityWithHostName:hostName];
if(NotReachable == [r currentReachabilityStatus]) {
NSLog(@"Not Reachable");
return NO;
}
NSLog(@"Reachable");
return YES;
}