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

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

c# - Call function from DLL -