You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use this library for years for production. Recently I found this bug on iOS 13.2.3, iPad Mini4 connect over wifi. How to produce the bug: Connect the iPad to the wifi network and then disconnect optical cable (simulate lost internet connection). But it continue to "REACHABLE".
I have not test this on the iPhone.
Code test on Xcode 11.2.1, MacOS 10.14.4:
// Allocate a reachability object
Reachability* reach = [Reachability reachabilityWithHostname:@"www.google.com"];
// Set the blocks
reach.reachableBlock = ^(Reachability*reach)
{
// keep in mind this is called on a background thread
// and if you are updating the UI it needs to happen
// on the main thread, like this:
dispatch_async(dispatch_get_main_queue(), ^{
NSLog(@"REACHABLE!");
});
};
reach.unreachableBlock = ^(Reachability*reach)
{
NSLog(@"UNREACHABLE!");
};
// Start the notifier, which will cause the reachability object to retain itself!
[reach startNotifier];
The text was updated successfully, but these errors were encountered:
I use this library for years for production. Recently I found this bug on iOS 13.2.3, iPad Mini4 connect over wifi.
How to produce the bug: Connect the iPad to the wifi network and then disconnect optical cable (simulate lost internet connection). But it continue to "REACHABLE".
I have not test this on the iPhone.
Code test on Xcode 11.2.1, MacOS 10.14.4:
The text was updated successfully, but these errors were encountered: