3

I'm not finding this simple thing: I'd like to check if the user has wi-fi in active state or not, even if the device is not connected to internet.

So I'd like not to test the internet connectivity but only if the "settings" switch state ON/OFF).

This may influence a lot the GPS accuracy.

Renjith
  • 5,783
  • 9
  • 31
  • 42
Paolo M
  • 31
  • 4

2 Answers2

2

I don't think it's possible (at least without any private APIs for jailbroken iPhone App development)

Refer this link.

Hope this keeps you moving.

Community
  • 1
  • 1
viral
  • 4,168
  • 5
  • 43
  • 68
1

I feel Reachability is the best thing to use for this scenario. Here's a link

Anil
  • 2,430
  • 3
  • 37
  • 55
  • @Anil I don't think that, this will give the status of *Whether WiFi switch is ON or OFF in settings?* The OP want's the status of the WiFi, not the network connectivity. – viral Apr 03 '13 at 07:31
  • @Viral, it can't be done with public APIs. See http://stackoverflow.com/questions/8119865/iphone-check-wifi-network-switch-is-on-off and http://stackoverflow.com/questions/6650452/nsnetservice-on-wifi-instead-of-bluetooth. As recommended in the second link though, you can recommend to your users (perhaps via an alert) that they enable WiFi while using your app. – JRG-Developer Apr 03 '13 at 07:33
  • @JRG-Developer That's what I've suggested in my answer. – viral Apr 03 '13 at 07:35
  • @Viral, it sounds like we're on the same page then. :D – JRG-Developer Apr 03 '13 at 07:36