When I use NEHotspotConfigurationManager
to connect to a WiFi access point, and I intentionally use an invalid password or SSID, I don't get the programmatic feedback I expect. The user receives feedback that the connection failed via an alert, but in the completion block supplied to the apply
function, error
is nil, the same as the success case. This makes it impossible for me to differentiate the success and failure cases. The NEHotspotConfigurationError
has both .invalidSSID
and .invalidWPAPassphrase
. I would expect these to be returned instead. This feels like a radar to me, but I wanted to get some feedback on here first.
NEHotspotConfigurationManager.shared.removeConfiguration(forSSID: "test")
let configuration = NEHotspotConfiguration(ssid: "test", passphrase: "testasdasd", isWEP: false)
configuration.joinOnce = true
NEHotspotConfigurationManager.shared.apply(configuration) { (error) in
// error is nil
}