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. :)
Thanks.
Find the Wi-Fi You're Connected to on macOS If you've already connected to a Wi-FI network, you can find its name in the Wi-Fi menu in Mac's menu bar. Find and select the Wi-Fi menu in the Mac's menu bar. The network you are connected to will be listed with a lock icon.
Open System Preferences from the Apple menu and choose “Network” Click the “Advanced” button and choose the “Wi-Fi” tab. Look under the “Preferred Networks” list to find the list of previously connected wireless networks, it is scrollable.
On your Mac, choose Apple menu > System Preferences, then click Network . Select the network connection you want to check in the list at the left.
For osX Yosemite 10.10 use
#import <CoreWLAN/CoreWLAN.h>
-(void)prettyFunctionName
{
CWInterface* wifi = [[CWWiFiClient sharedWiFiClient] interface];
NSLog(@"BSD if name: %@", wifi.interfaceName);
NSLog(@"SSID: %@", wifi.ssid);
NSLog(@"txRate: %f", wifi.transmitRate);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With