Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

get wifi's scanned SSID list in iOS using Swift

Tags:

ios

swift

wifi

ssid

I'd like to know if it is possible with swift to get a list scanned WIFI SSID from the iPhone ,( using APIs like MobileWiFi.framework or something else ) and see code examples about that (without Objective-C source code )

like image 584
the_one Avatar asked Jul 09 '15 14:07

the_one


People also ask

How can I get a list of available Wi-Fi networks from iOS app?

To do this, open System Preferences, and then click Network. Select Wi-Fi in the sidebar, and then click Advanced. In the Wi-Fi tab, you will see a list of networks. This list is mainly there so you can choose an order of preference for joining networks.


2 Answers

It is only possible to get the SSID of the network that you are currently connected to.

like image 80
FredLoh Avatar answered Sep 20 '22 13:09

FredLoh


It is officially not possible with any language (objective-c and swift). You can look at the answer given by an official apple stuff in the following url.

https://forums.developer.apple.com/thread/13157

where the apple stuff says :

It's not possible to do this in any general way.

Also, you can take a look at the answer given by the same apple stuff in the following link :

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

where he/she also says :

NEHotspotHelper was not designed as a general purpose ‘list nearby Wi-Fi networks’ API.

You can only get your current SSID.

like image 28
Burak Gavas Avatar answered Sep 21 '22 13:09

Burak Gavas