-1

I need to get list of able networks with its parameters(ex. SSID), using NetworkExtensions. Now, I'm in process for getting access to NetworkExtensions library, that's need some time after request.

If someone has already existed code, maybe some personal-written func and can shared that's code with me and other forum users - do it:)

UPD: There's in answers some good ideas and linking for kNEHotspotHelperCommandTypeFilterForScan, but I really don't know how use it.

Golovanov Dmytrii
  • 527
  • 1
  • 6
  • 20

1 Answers1

1

Looks like, you cannot simply access that info using Captive network Api's. You can get the details of the wifi your device is currently connected to using CNCopyCurrentNetworkInfo

you can get ssid details using NEHotspotHelper in Network Extension, but you need to get access from Apple before using NEHotspotHelper.

Using NEHotspotHelperCommandType => FilterScanList(Filter the Wi-Fi scan list) and Evaluate(Evaluate the network). you can get all available NEHotspotNetwork(whcih will contain ssid, bssid, and signalStrength) after registeration is successful

Reference : https://stackoverflow.com/a/39189063/1741121

Gokul G
  • 698
  • 4
  • 11
  • You right, I can do my task with NEHotspotHelper, after getting aches from apple. This process will be ~3 weeks. Maybe you can write some code for using FilterScanList – Golovanov Dmytrii May 03 '18 at 13:31
  • NEHotspotNetwork will only return a list of networks when the user navigates to the Wi-Fi page in Settings. See [this answer](https://stackoverflow.com/a/52472782/35690) for more details. – Senseful Sep 24 '18 at 04:45
  • NEHotspotNetwork.fetchCurrent gives me current connected SSID network only for few seconds and after that mostly around 4-5 seconds it returns nil object.. any idea? I am tryinng to get connected SSID information while app is in background in iOS 14.. thankns – shaqir saiyed Dec 03 '20 at 11:02