-(BOOL)IsInternateAvailable
{
Reachability* internetReachable;
internetReachable = [[Reachability reachabilityForInternetConnection] retain];
[internetReachable startNotifier];

NetworkStatus internetStatus = [internetReachable currentReachabilityStatus];

switch (internetStatus)
{
case NotReachable:
{
NSLog(@”The internet is down.”);
return NO;
}
}

return YES;
}

Advertisements