AFNetworking 2.0 Reachability not working

I’m having some trouble making AFNetworking Reachability module to work. I have setup my AFHTTPRequestOperationManager with a ReachabilityStatusChangeBlock but it’s never being called.

self.manager = [[AFHTTPRequestOperationManager alloc] initWithBaseURL:[NSURL URLWithString:@""]];
    self.manager.responseSerializer = [AFJSONResponseSerializer serializer];
    NSOperationQueue *operationQueue = self.manager.operationQueue;
    [self.manager.reachabilityManager setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {
        switch (status) {
            case AFNetworkReachabilityStatusNotReachable:
            // we need to notify a delegete when internet conexion is lost.
            // [delegate internetConexionLost];
                NSLog(@"No Internet Conexion");
            case AFNetworkReachabilityStatusReachableViaWiFi:
            case AFNetworkReachabilityStatusReachableViaWWAN:
            NSLog(@"Unkown network status");
            [operationQueue setSuspended:YES];

I have imported SystemConfiguration/SystemConfiguration.h in my .pch as the documentation says. Every time i ask for the status i get the value -1.

  • how to block user , if he/she not connected to internet connection when my app load
  • Check if iPhone is connected to the internet
  • Reachability not working when wi-fi connected but no internet
  • Reachability and IPv6
  • Figure out if there is internet or not, including wifi or data (Swift 3)
  • How to check for an active Internet connection on iOS or OSX?
  • Any help?


    I add my PodFile here:

    pod 'AFNetworking'              ,'~> 2.0.0'
    pod 'AFNetworking/Reachability' ,'~> 2.0.0'

    Solutions Collect From Internet About “AFNetworking 2.0 Reachability not working”

    I needed to start the reachability monitor.

    [self.manager.reachabilityManager startMonitoring]; 

    I find it by accident, documentation should state this in my opinion.