osx - How can I retrieve list of Wi-Fi hotspots in Mac application? -
i need programatically retrieve list of nearest wi-fi hotspots(preferably using swift, if it's not possible, objective-c do) , don't how can it. have tried search samples, 1 found outdated , doesn't run on xcode 6.3. great.
i'm trying use swift code below, it's not working, tips?
var ind = cwinterface() @ibaction func doer(sender: anyobject) { var network:cwnetwork? var networks = ind.scanfornetworkswithname(nil, error: nil) network in networks { print(network) }
you can check out , update apple project here (that mentioned) of link current interfaces apple exposes.
for example instead of using kcwphymode11a
use kcwphymode11a
, instead of using kcwsecuritymodewep
use kcwsecuritywep
. try changing these two, go definition of kcwsecuritymodewep
and, you'll see in header corresponding elements changed, thankfully have descriptive names it's kind of straight forward match. keep in mind enums may have changed - cwsecurity
, need search little developer notes on these changes.
Comments
Post a Comment