NEHotspotConfigurationErrorDomain Code=8 "internal error."

If you are still experiencing this. Make sure to add the HotSpot Capability to the AppID you are using, also add it in the Xcode Target Capabilities configuration tab and make sure to link the NetworkExtensions.framework.

Xcode Target Capabilities Tab

This did fix the issue for me.


For now, only a restart of the device fixes the issue for some time and then it happens again.

Full log: Domain=NEHotspotConfigurationErrorDomain Code=8 "internal error." UserInfo={NSLocalizedDescription=internal error.}

I've tried calling NEHotspotConfigurationManager.shared.removeConfiguration(forSSID: ssid) each time before calling:

let hotspot = NEHotspotConfiguration(ssid: ssid, passphrase: pwd, isWEP: false)
hotspot.joinOnce = true
NEHotspotConfigurationManager.shared.apply(hotspot) { (error) in
    completionHandler?(error)
}

But the issue still happens...