17

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 )

the_one
  • 261
  • 3
  • 10
  • Any luck with getting a answer to this question? – user1408682 Oct 08 '15 at 14:21
  • I dont think its possible ! It doesnt matter if its Swift or Objective-C nor C++, the basic principle of iOS is that only system can connect to WiFi or turn on off those system setting. All you can get is info about the currently connected network. App sandbox in ios limits all other possibility. – Bishal Ghimire Dec 06 '15 at 02:54
  • Are you on a jailbroken environment? I could potentially post an answer porting [this old project](https://github.com/ipinak/iOS-WiFi) to Swift. – JAL Dec 10 '15 at 17:23
  • 1
    Possible duplicate of [iPhone get a list of all SSIDs without private library](https://stackoverflow.com/questions/9684341/iphone-get-a-list-of-all-ssids-without-private-library) – Senseful Sep 24 '18 at 05:23

2 Answers2

10

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

FredLoh
  • 1,804
  • 18
  • 27
3

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.

Burak Gavas
  • 1,304
  • 1
  • 9
  • 11