I want to make the simulator device connect to the Wi-Fi AP using the code below.
let wifiConfiguration = NEHotspotConfiguration(
ssid: appDelegate.SSID,
passphrase: appDelegate.Pwd,
isWEP: false)
Of course, the following code was executed before trying to connect.
locationManager.requestWhenInUseAuthorization()
However, the connection fails with the error below.
2023-04-05 15:53:22.366259+0900 WiFiProvisioning[6316:80203] [] Failed to send a 9 message to nehelper: <dictionary: 0x1b44293f0> { count = 1, transaction: 0, voucher = 0x0, contents =
"XPCErrorDescription" => <string: 0x1b4429588> { length = 18, contents = "Connection invalid" }
}
2023-04-05 15:53:22.366606+0900 WiFiProvisioning[6316:80203] [] NEHotspotConfigurationHelper failed to communicate to helper server.
When I install the app on my real iPhone device, it connects to the AP.
The version information is as follows.
- Mac PC chip : Apple M1 Pro
- macOS : Ventura 13.3
- Xcode : 14.3
- Simulator iOS : 16.4
- My iPhone iOS : 16.4