Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not work on iOS 13.2.3, iPad Mini 4 #175

Open
dzungpv opened this issue Nov 21, 2019 · 1 comment
Open

Not work on iOS 13.2.3, iPad Mini 4 #175

dzungpv opened this issue Nov 21, 2019 · 1 comment

Comments

@dzungpv
Copy link

dzungpv commented Nov 21, 2019

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];
@mantasoff
Copy link

I am still getting the same error. Most of the ping requests return Reachable (iPhone simulator)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants