iOS Get list of all WiFi networks
This might be possible with NetworkExtension (available since iOS 8). But you need the com.apple.developer.networking.HotspotHelper
-entitlement in you app to use these APIs. To get these entitlement, you have to contact Apple and describe, why you need it.
I haven't found any code examples, but maybe the documentation of NetworkExtension
helps you.
Related videos on Youtube
Comments
-
jungledev almost 2 years
This is not a duplicate of the dozens of similar questions (too many to list) because I have evidence that it is possible to publish an app that displays a list of wifi networks.
So, it has been widely accepted and understood that you cannot get a list of all wifi networks without using a private api. The use of a private api will cause an app to be rejected from app store review.
However, Google did it recently in their Google Home app that was released on 10/26/2016, so it must be possible now. How?!?
Note- their App Store listing says the app supports iOS 8.0 or later. I need to further test if this functionality only exists on the iOS 10 version of the app, or if it in fact also exists on iOS 8 and 9.
(I grayed out my wifi name and mac address in the image)I'm using Objective-C, so if you submit a solution in Swift, please submit an ObjC one too!
-
woz over 7 yearsThe use of a private API will cause your app to be rejected. That doesn't mean all apps that use a private API will be rejected.
-
OliverD over 7 yearsDid you think of that Googles App connects via bluetooth to the google home device and this device responds with the list of WiFi-Networks?
-
Rok Jarc over 7 yearsOliverM has a valid point here. If you don't turn BT on you are instructed to go to OS settings and to connect to home devices temporary hotspot WiFi network and then return back to the app to continue with setting up procedure.
-
jungledev over 7 years@OliverM I suspected that was the case. Still worth asking, just to be sure. Woz, could you elaborate?
-
Dave S over 7 yearsJungle we would very much like to do this in our app but it simply was not possible a year ago or so. I'm positive Google is doing this over bluetooth. We've opened tickets with Apple and were told this was simply not available.
-
Senseful over 5 yearsPossible duplicate of iPhone get a list of all SSIDs without private library
-
jungledev over 5 years@Senseful, not a duplicate because my question was clearly stating 'Is it possible now..' (at the time of the post) based on the new evidence.
-
Senseful over 5 years@jungledev: I agree and like the reposting. However 2 years passed, and I think having a single question with all solutions (old and new) could benefit the community. I wanted to make sure this question is linked to the original, and marking as duplicate is one way to do that. I also refreshed the original's content to hopefully entice more relevant conversation.
-
-
Johnny about 7 yearsI‘v been refused by Apple Network Extension Staff for two times for getting this entitlements. Now, I'll apply for one more times. Could you suggest on How could I explain the use of purpose of my application, so that they will agree my apply ?
-
Nupur Gupta about 6 yearsDo you find any solution?
-
Senseful over 5 yearsNEHotspotNetwork will only return a list of networks when the user navigates to the Wi-Fi page in Settings. See this answer for more details.
-
guru almost 5 years@VictorJohn did you succeed? I am using below code: NEHotspotConfigurationManager.shared.getConfiguredSSIDs { (ssidsArray) in print("ssidsArray.count==(ssidsArray.count)") for ssid in ssidsArray { print(" Connected ssid = ",ssid) } } but it only return connected Wifi.
-
Kudos about 3 yearsHey @guru try this. When entering wrong ssid and password, Wifi is not conencted also we dont get any error in closure.