Forum Xamarin.iOS

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 "" 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 
        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();

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 :)


Sign In or Register to comment.