Getting OSX Connected Wi-Fi Network Name


Question or issue on macOS:

I need to get the name of the currently connected Wi-Fi SSID on OSX.

I’ve messed with the SystemConfiguration framework, I feel like it is there (as I am able to get the name of the network locaiton) but I am not really finding a way of getting the Wi-Fi SSID.

Would appreciate any help. 🙂


How to solve this problem?

Solution no. 1:

You can use the CoreWLAN framework: CWInterface has a property called ssid. The code below gets the current wireless interface and shows its BSD name and its SSID. It works on Mac OS 10.6+.


int main() {
    NSAutoreleasePool *pool = [NSAutoreleasePool new];

    CWInterface *wif = [CWInterface interface];

    NSLog(@"BSD if name: %@",;
    NSLog(@"SSID: %@", wif.ssid);

    [pool drain];
    return 0;


$ ./wif
BSD if name: en1
SSID: Aetherius

Solution no. 2:

For osX Yosemite 10.10 use


  CWInterface* wifi = [[CWWiFiClient sharedWiFiClient] interface];

  NSLog(@"BSD if name: %@", wifi.interfaceName);
  NSLog(@"SSID: %@", wifi.ssid);
  NSLog(@"txRate: %f", wifi.transmitRate);

Hope this helps!