0

When user open my app, I want the Wi-Fi is enabled, it can have no connection ,but the Wi-Fi must be enabled. The query should return true when WiFi is enabled and device is not connected to any network.

Code cracker
  • 3,105
  • 6
  • 37
  • 67

1 Answers1

0

Well there is no official support by Apple for this. There however is some trick to get the required result but there are changes of your app being rejected.

Have a look at this unofficial trick: http://www.enigmaticape.com/blog/determine-wifi-enabled-ios-one-weird-trick

To answer your second question i.e. If wifi is enabled, you can find out if internet is accessible of not using this: iOS Detect 3G or WiFi

Community
  • 1
  • 1
atulkhatri
  • 10,896
  • 3
  • 53
  • 89
  • Thanks, but I had tried the method in the link you posted, the log message is not like his, the enable wifi or disable wifi just log the same message, so I can not tell whether wifi is enabled. The second question we just also have to connect to internet .... – malaimo feng Mar 31 '15 at 11:04