Hello,
We are using NEHotspotConfigurationManager to connect to a GoPro camera. We instantiate NEHotspotConfiguration as indicated below and use the applyConfiguration API to automatically switch to the camera Wi-Fi.
let configuration = NEHotspotConfiguration.init(ssid:SSID, passphrase:password, isWEP: false)
configuration.joinOnce = false
NEHotspotConfigurationManager.shared.apply(configuration) { (error) in
var message = "Joined Wi-Fi succefully!"
if let err = error {
message = "\(err)"
}
let alert = UIAlertController(title: nil, message: message, preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Okay", style: .default, handler: nil))
self.present(alert, animated: true, completion: nil)
}
Occasionally, calling the API fails without error and the "Unable to join Wi-Fi" alert shows up. It seems to us that this is caused by iOS not scanning when the the applyConfiguration is called. If this is correct, is there anything that we could do to trigger a scan from within the app?
If needed we have the sysdiagnose log that we can upload.
Thanks,
Glauco