iOS: reachability and AFNetworking -


I have this code in your AppDelegate:

  - (bool) application: (UIApplication *) application didFinishLaunchingWithOptions: (NSDictionary *) launchOptions {[[AFNetworkReachabilityManager sharedManager] setReachabilityStatusChangeBlock: ^ (AFNetworkReachabilityStatus status) {if (state == AFNetworkReachabilityStatusNotReachable) {NSLog (@ "no connection"); } Else if (state == AFNetworkReachabilityStatusReachableViaWiFi || state == AFNetworkReachabilityStatusReachableViaWWAN) {NSLog (@ "No connection"); }}]; [[AFN Network Reachability Manager Shared Manager]] StartMoning]]; Yes come back }  

But this does not work, I am not my log, why?

block only when called reachability actually turns into

you You can get the current situation like:.

  [[AFNetworkReachabilityManager sharedManager] accessible]  

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -