iphoneios5captivenetwork

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


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?


Solution

  • 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.