Display all available WIFI connections with Swift in OS X
<p>I'm trying to display all available WIFI connections. It doesn't work. Here is my code: </p>

<pre><code>import Foundation
import CoreWLAN

var cwInterface = CWInterface()

do {
    let routers = try cwInterface.scanForNetworksWithSSID(nil)
    print(routers)
} catch let error as NSError {
    print("Error: \(error.localizedDescription)")
}
</code></pre>

<p>I don't get any result. What I'm doing wrong?</p>