1

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?

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
CC.Wang
  • 111
  • 1
  • 12

1 Answers1

0

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.

Mihail Duchev
  • 4,691
  • 10
  • 25
  • 32