Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 11.0 - Periodically scan for SSIDs (WiFi) nearby

I would like to scan for nearby SSIDs of the Wi-Fi networks periodically (without connecting to it) and implement an SSID filter (one or multiple). Once a match is found a back-end API call is initiated.


I have done a quick research on the Hotspot Helper framework in iOS 10. I found that, these APIs are not designed for the use I’ve identified.


Seems like, iOS 11 now allows apps to manage Wi-Fi configurations programmatically. Apple added a network extension for hotspot configuration methods and properties. Please click here to see the changes. 


My question here is, can I achieve my goal through the newly iOS 11 hotspot configuration class? Or does this provide the SSID of a known network or the currently connected one?



Any help on this is highly appreciated.

like image 287
Shamsudheen TK Avatar asked Jun 09 '17 06:06

Shamsudheen TK


People also ask

Does iPhone have a Wi-Fi Analyzer app?

NetSpot — is the best WiFi analyzer app on the Apple App Store. Network Analyzer by Technet — can help you diagnose problems with your WiFi network and gather diagnostic information for a variety of different purposes. Wi-Fi SweetSpots — is more than just an internet speed test utility.


2 Answers

Unfortunately, we can't achieve this in iOS.

When I learned about NEHotspotConfiguration, I was initially excited, because I was hoping we could automate this process. However, it doesn't look like there's a way to retrieve a list of currently available SSIDs, which makes NEHotspotConfiguration much less useful for our use case.

like image 155
Shamsudheen TK Avatar answered Oct 12 '22 11:10

Shamsudheen TK


Not possible.

I enabled the NEHotspotHelper permission and tried on a Demo app. Even though Apple does allow you to configure wifi connections, in order to get the list of available networks, you need to open the Settings > WiFi page to get the list. This API can NOT offer the ability to scan the WiFi list in background, not to mention periodically.

It's a pity for developers, but I think it's good for iOS users, to protect privacy and safety by strict restriction of the API usage.

like image 43
陈健 Mark Avatar answered Oct 12 '22 11:10

陈健 Mark