Setting up reachability with AFNetworking 2.0

后端 未结 4 621
耶瑟儿~
耶瑟儿~ 2020-12-13 10:32

I am trying to setup Reachability using the new 2.0 AFNetworking.

In my AppDelegate I initialise the sharedManager.

// Instantiate Shared Manager
[A         


        
4条回答
  •  一生所求
    2020-12-13 11:09

    As you can read in the AFNetworking read me page

    [[AFNetworkReachabilityManager sharedManager] setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {
        NSLog(@"Reachability: %@", AFStringFromNetworkReachabilityStatus(status));
    }];
    

    Here's also a link to the official documentation.

提交回复
热议问题