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 )
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
It is only possible to get the SSID of the network that you are currently connected to.
回答2:
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.