查找可用的 Wi-Fi 网络 [英] Find available wi-fi networks
问题描述
如何查找并列出范围内的所有 wi-fi 网络?
How can I find and list all the wi-fi networks in range?
推荐答案
据我所知你可以使用 CNCopySupportedInterfaces
和 CNCopyCurrentNetworkInfo获取当前连接的 Wi-Fi 的信息CaptiveNetwork 的代码>.更多信息可以参考:如何使用 CaptiveNetwork 获取当前 WiFi 热点名称.
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.
如果不使用私有库 (Apple80211),您只能获取设备当前连接的网络的 SSID.
Without the use of private library (Apple80211) you can only get the SSID of the network your device is currently connected to.
如果您有兴趣,可以查看 iphone-wireless 项目在 Apple80211 中.有一个示例应用 "Stumber" 完全符合您的要求.但是如果你想发布到 App Store,你不能在你的应用程序中使用它,因为它使用私有 API.Apple 拒绝使用私有 API 的应用.
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.
这篇关于查找可用的 Wi-Fi 网络的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!