Find available wi-fi networks

前端 未结 1 416
再見小時候
再見小時候 2020-12-03 08:24

How can I find and list all the wi-fi networks in range?

相关标签:
1条回答
  • 2020-12-03 08:38

    As far as I know you can get the information about the current connected Wi-Fi using CNCopySupportedInterfaces and CNCopyCurrentNetworkInfo of CaptiveNetwork. You can refer to: How do I use CaptiveNetwork to get the current WiFi Hotspot Name for more information.

    According to iPhone get a list of all SSIDs without private library:

    Without the use of private library (Apple80211) you can only get the SSID of the network your device is currently connected to.

    You could have a look at iphone-wireless project if you are interested in Apple80211. There exists a sample app "Stumber" which does exactly what you want. But you cannot use this in your app if you want to publish to App Store because as it uses private APIs. Apple rejects apps those use private APIs.

    0 讨论(0)
提交回复
热议问题