esqew esqew - 1 month ago 6
iOS Question

Reachability Guide for iOS

Has anyone found a halfway decent guide to implementing Reachability on iOS?

Answer Source

I have implemented Reachability like this. Download and add Reachability.h and .m to your project. Add the SystemConfiguration framework to your project. #import "Reachability.h" where you want to use it. Use this code.

-(BOOL)reachable {
    Reachability *r = [Reachability reachabilityWithHostName:@""];
    NetworkStatus internetStatus = [r currentReachabilityStatus];
    if(internetStatus == NotReachable) {
        return NO;
    return YES;

When you want to check for reachability...

if ([self reachable]) {
else {
    NSLog(@"Not Reachable");

Here is the example project that I made.