A manager that applies and removes hotspot configurations of Wi-Fi networks.


class NEHotspotConfigurationManager : NSObject


When your app creates a new hotspot configuration using NEHotspotConfiguration and applies it to a Wi-Fi network or attempts to update a previously configured network, the device prompts the user for approval. Without explicit user consent, your app can't make configuration changes.

Your app can use removeConfiguration(forHS20DomainName:) or removeConfiguration(forSSID:) to delete a configuration that it has added, but not a configuration added by another app or user. The user can also delete configured networks using Settings > Wi-Fi.

When your app is uninstalled, iOS removes the configurations of all networks your app has configured, including their keychain entries.

Hotspot Configuration Manager errors are listed in NEHotspotConfigurationError.


Applying a Configuration

func apply(NEHotspotConfiguration, completionHandler: ((Error?) -> Void)? = nil)

Adds or updates a Wi-Fi network configuration after prompting the user for permission, and then attempts to join the network under certain conditions.

Getting the Current Configuration

func getConfiguredSSIDs(completionHandler: ([String]) -> Void)

Returns the SSIDs or the names of the Wi-Fi hotspot domains that your app has configured and invokes an optional completion handler.

Removing a Domain Name Configuration

func removeConfiguration(forHS20DomainName: String)

Removes a Wi-Fi hotspot configuration, identified by a Hotspot 2.0 domain name, that your app previously added.

Removing an SSID Configuration

func removeConfiguration(forSSID: String)

Removes a Wi-Fi configuration, identified by an SSID, that your app previously added.

Sharing a Configuration


Inherits From

Conforms To

See Also