IOS Get a list of all Wi-Fi networks

This is not a duplicate of dozens of similar questions (too much to list) , because I have evidence that you can publish an application that displays a list of Wi-Fi networks.

So, it was widely accepted and understandable that you cannot get a list of all Wi-Fi networks without using a private api. Using a private api will cause the application to be rejected from the app store check.

However, Google did this recently in its Google Home application, which was released on October 22, 2006, so it should be possible now . How?!?

Notice in the App Store list that the application supports iOS 8.0 or later. I need to additionally check whether this functionality exists only in the version of the iOS 10 application or if it really exists in iOS 8 and 9.
(I displayed my wifi name and mac address in the image)

enter image description here

I use Objective-C, so if you submit the solution to Swift, send ObjC as well!

+11
source share
2 answers

This may be possible with NetworkExtension (available from iOS 8). But to use these APIs, you need com.apple.developer.networking.HotspotHelper -entitlement in your application. To obtain these rights, you need to contact Apple and describe why you need it.

I did not find any sample code, but perhaps the NetworkExtension documentation will help you.

+5
source

I can not get the wifi list. Can anyone share the code to get the entire list of Wi-Fi programmatically in iOS.

I am using Apple Network Extension but cannot find any solution.

I use the code below to do this and each time I get 0 object:

 NEHotspotConfigurationManager.shared.getConfiguredSSIDs { (ssidsArray) in print("ssidsArray.count==\(ssidsArray.count)") for ssid in ssidsArray { print("Connected ssid = ",ssid) } } 
0
source

Source: https://habr.com/ru/post/1259978/


All Articles