iOS API检测无线网络

时间:2010-10-20 11:29:58

标签: iphone cocoa-touch ios wifi

CocoaTouch / iOS中是否有用于检测无线网络的API?我想写一个应用程序来保存手机在给定时刻可以看到的网络列表。

2 个答案:

答案 0 :(得分:4)

据我所知,您可以使用CNCopySupportedInterfacesCNCopyCurrentNetworkInfo CaptiveNetwork获取有关当前连接的Wi-Fi的信息。您可以参考: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.

如果您对Apple80211感兴趣,可以查看iphone-wireless项目。有一个示例应用" Stumber"这正是你想要的。但是,如果要发布到App Store,则不能在应用程序中使用此功能,因为它使用私有API

答案 1 :(得分:0)