0

How can I detect Internet (not WiFi) connectivity on iOS? The reachability .h and .m files detect WiFi connectivity, but what about the scenarios where WiFi is on, but the modem's cable is unplugged? In those cases, WiFi is enabled, but there's no Internet connectivity.

Michael Petrotta
  • 59,888
  • 27
  • 145
  • 179
Mano
  • 670
  • 1
  • 9
  • 28

1 Answers1

1

You can use the Apple reachability, I have a small project in gitHub that is an example of Reachability usage, in my project the MMReachabilityViewController it's a generic example, but you can change it and the Apple lib let you check the connection in 3 different way:

reachabilityForInternetConnection // generic

reachabilityForLocalWiFi // local wifi

reachabilityWithHostName // for apllication based on a specific host
Manu
  • 788
  • 5
  • 10