iosxamarinwifinehotspothelper

Connect to an already remembered SSID in iOS through Xamarin


I am implementing an app through Xamarin.

Is it possible to programmatically connect to an SSID which is already remembered by the phone in iOS?


Solution

  • No, it is not possible to connect to a known network, without providing the necessary credentials, due to various security reasons.

    In order to connect to a network, you need to create a NEHotspotConfiguration

    The class requires either only SSID (for open networks), or SSID with some credentials for authentication.

    After the configuration is created, you can connect via NEHotspotConfigurationManager like so:

    await NEHotspotConfigurationManager.SharedManager.ApplyConfigurationAsync(config);
    

    NB: Keep in mind that to connect to a network, you need to enable the Hotspot capability in your App Capabilities Working with capabilities.