Can't List SSID WiFi Available Networks

487 views Asked by At

I'm programming for OSX/Cocoa with CoreWLan. And when I've attempt to use scanForNetworksWithName method from CWInterface, it always returns me an empty list of networks.

I've read in a good number of posts here in StackOverflow and in other places on how to use this method, and it looks like I'm doing nothing wrong. Can someone point me what can I be missing?

My OS is Yosemite 10.10.3. And my code is as follow:

NSArray *networks = [[currentInterface scanForNetworksWithName:nil error:nil] allObjects];
for (CWNetwork *network in networks) {
    // code do not enter here, as networks is always empty, even with
    // several SSID's appearing in my list of WiFi connections
}
1

There are 1 answers

0
Marcelo On

This issue have extended to a deeper investigation. Looks like it is not a problem is CWInterface or CWNetwork. So, the answer may be related to another question, that I just opened here.