3

In Monotouch on an iPhone/iPod, how do I detect if there is an internet connection available?

1

1 Answer 1

9

The best way right now is to use this class from Miguel de Icaza's GitHub repository:

https://github.com/xamarin/monotouch-samples/blob/master/ReachabilitySample/reachability.cs

Its a static class with a lot of methods, so all you have to do is add it to your project and call, for example:

NetworkStatus status = Reachability.InternetConnectionStatus();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.