WiFi SSID information in ios 12

AnmolModiAnmolModi USMember ✭✭
edited December 2018 in Xamarin.iOS

I have enabled "Access WiFi information" service in AppId.
And also added "com.apple.developer.networking.wifi-info" into my entitlement list.
Still I'm not getting SSID of current WiFi in iOS 12.
Can anyone help me in this situation?
Here is code sample I'm trying

 public string CurrentSSID 
{
    get
    {
        NSDictionary dict;
        var status = CaptiveNetwork.TryCopyCurrentNetworkInfo ("en0", out dict);
        if (status == StatusCode.NoKey)
        {
            return string.Empty;
        }

        var bssid = dict [CaptiveNetwork.NetworkInfoKeyBSSID];
        var ssid = dict [CaptiveNetwork.NetworkInfoKeySSID];
        var ssiddata = dict [CaptiveNetwork.NetworkInfoKeySSIDData];

        return ssid.ToString();
    }
}
Tagged:

Best Answer

  • AnmolModiAnmolModi US ✭✭
    edited December 2018 Accepted Answer

    @ColeX thanks for help,
    I found out issue.
    Entitlements.plist was not added in Custom entitlements :)

Answers

Sign In or Register to comment.