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

StackOverflow https://stackoverflow.com/questions/14706134

  •  06-03-2022
  •  | 
  •  

Question

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?

Was it helpful?

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.

OTHER TIPS

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

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top