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

Connect hotspot without internet #358

Open
Elamuruga opened this issue Dec 2, 2019 · 4 comments
Open

Connect hotspot without internet #358

Elamuruga opened this issue Dec 2, 2019 · 4 comments

Comments

@Elamuruga
Copy link

I connected to the hotspot alone without the presence of the internet but its results come under Reachability state. It didn't identify the non-availability of the internet. Could you please help me with this? Even though it was connected with hotspot it needs to check internet availability is there in that or not?

@anismansuri63
Copy link

You can check reachability with host name.
let reachability = try? Reachability(hostname:"google.com")
Look at the example https://github.com/ashleymills/Reachability.swift/blob/master/ReachabilitySample/ViewController.swift

@Elamuruga
Copy link
Author

Elamuruga commented Dec 20, 2019

@anismansuri63 Thanks for your response. But the above solution was not working. Any other way is there? Could you please help with this?

@Elamuruga
Copy link
Author

Elamuruga commented Dec 24, 2019

The above solution was coming under both wifi and no connection state when connected to hotspot without the internet. And by using closures it comes inside both whenReachable and whenUnreachable. Could you please help me with this? thanks in advance

@dcAccedo
Copy link

dcAccedo commented Sep 1, 2020

Hi, did you have a chance to solve this? I am trying to know if device actually can do request or not.

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

3 participants