2

I have a xamarin.MAC application built using Xamarin.MAC. Now I need to find a way to get the connected Wifi SSID in MAC application. I see lot of solution for xamarin.ios.But couldn't see the solution for MAC Application. Do any one know how can I detect SSID in the Xamarin.MAC application?

Thanks in Advance

Roshil

Roshil K
  • 2,583
  • 28
  • 38

1 Answers1

3

Use the CoreWLan framework, something like this will get you started:

var client = CWWiFiClient.SharedWiFiClient;
foreach (var @interface in client.Interfaces) // you can have multiple wifi devices connected at once
{
    if (@interface.DeviceAttached)
    {
        Console.WriteLine(@interface.Ssid);
    }
}

re: https://developer.apple.com/documentation/corewlan/cwwificlient

SushiHangover
  • 73,120
  • 10
  • 106
  • 165