CNCopySupportedInterfaces gives list of all configured Wifi interfaces information or only one which is active currently?

喜你入骨 提交于 2020-01-04 14:12:13

问题


I want to use the CNCopySupportedInterfaces API to get the SSID of Wifi interface. But I just have doubt about the API CNCopySupportedInterfaces. Will this API provide a list of all configured Wifi interfaces or only one which is currently active or info about all access points that are reachable (but not configured) at that moment?


回答1:


CNCopySupportedInterfacesand CNCopyCurrentNetworkInfo of CaptiveNetwork, will gives only your connected wifi name and detail, Without the use of private library (Apple80211) it will not provide you other reachable wifi list or other info.

You can refer to: How do I use CaptiveNetwork to get the current WiFi Hotspot Name for more information.

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.




回答2:


As of iOS 9 Beta 4 CNCopySupportedInterfaces is deprecated. Much pain ensuing....

https://forums.developer.apple.com/message/31340#31340



来源:https://stackoverflow.com/questions/14706134/cncopysupportedinterfaces-gives-list-of-all-configured-wifi-interfaces-informati

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!