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

is apollo provide internet check class? #1407

Closed
tapannathvani opened this issue Sep 24, 2020 · 4 comments
Closed

is apollo provide internet check class? #1407

tapannathvani opened this issue Sep 24, 2020 · 4 comments
Labels
networking-stack question Issues that have a question which should be addressed

Comments

@tapannathvani
Copy link

I am trying to check internet connection in my project.. and looking in apollo-ios library also like if you guys providing any reachability type class so without adding any other library or framework i can use your class to check connection

If yes then please provide documentation link and if not then please let me know how can i achieve this? and can i check internet connectivity in HTTPNetworkTransportPreflightDelegate (will send) method or in should send method?

@designatednerd
Copy link
Contributor

We do not provide an internet check class, nor do we have plans to do so.

If you're using iOS 12 and above, the recommend way of doing things is using NWPathMonitor. If you're storing the most recent result from NWPathMonitor the preflight delegate would be a reasonable place to check it.

Please note that the Preflight delegate will be going away with 0.34.0 - you can check out the updated networking beta in #1386, and the PR has links to updated documentation. It would probably be fairly easy to add an interceptor that does that network check in the new networking stack.

@designatednerd designatednerd added networking-stack question Issues that have a question which should be addressed labels Sep 24, 2020
@tapannathvani
Copy link
Author

Can we know when can we have 0.34.0?

@designatednerd
Copy link
Contributor

Release candidate 2 is available now, gonna let it bake over the weekend and put it out monday night (US-Central time) if I don't hear any major showstoppers.

@tapannathvani
Copy link
Author

Thanks for the quick response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
networking-stack question Issues that have a question which should be addressed
Projects
None yet
Development

No branches or pull requests

2 participants