1
votes

I am developing an iOS app which requires a login, before logging in I want to "check" if the host is reachable. I have the reachability class in my touch project but since I use mvvmcross to fire the button events, how do I insert that check to the Icommand? I assume I do this in the "iOS Project" rather than in the "Core"? I just need to know how to bind it to the event.

1

1 Answers

4
votes

You can use MvxReachability from MvvmCross Network plugin like that:

Mvx.Resolve<IMvxReachability>.IsHostReachable("<your_host>")

If by some reasons you don't want to use MvvmCross Network plugin then you can just grab required classes (IMvxReachability and platform-specific MvxReachability implementations) from https://github.com/MvvmCross/MvvmCross/tree/v3.1/Plugins/Cirrious/Network