Created
June 17, 2013 09:39
-
-
Save Geri-Borbas/5795791 to your computer and use it in GitHub Desktop.
IP address SCNetworkReachability workaround.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (isAddressReachability) | |
{ | |
dispatch_async(dispatch_queue_create("com.eppz.reachability.workaround", NULL), ^ | |
{ | |
SCNetworkReachabilityFlags flags; | |
if (SCNetworkReachabilityGetFlags(self.reachabilityRef, &flags)) | |
{ | |
//'Manual' invocation of callback functionality. | |
dispatch_async(dispatch_get_main_queue(), ^ //Dispatch delegate callback on the main thread. | |
{ | |
[self parseFlags:flags]; | |
[self.delegate reachabilityChanged:self]; | |
}); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment