I am implementing an APP through Xamarin that will force the iPhone to connect to a specific SSID.
Here is my code
var config = new NEHotspotConfiguration(SSID, Password, isWep: false)
config.JoinOnce = true;
var tcs = new TaskCompletionSource<NSError>();
NEHotspotConfigurationManager.SharedManager.ApplyConfiguration(config, err => tcs.SetResult(err));
There are two test result
Assume the target SSID I want to connect called "SSID-A"
I delete the record of "SSID-A" in the iOS system page. Then deploy this APP to the phone. I give the correct SSID/Password into the code above. The system popup a message "Unable to join". Failed to connect to this SSID.
I go to iOS system page. Manually connect to "SSID-A". Check the connection is done. Then I connect to mobile phone to other SSID. And go back to the APP. This time. It works.
Why there is a different at here?
What can I do to look more into this problem to solve this?
Thanks!
From applyConfiguration:completionHandler: of apple document, we could see the dicsussion that:
Therefore, Join once seems can not mark sure it works.We could have a try with remove this line, or set
false
as follows:In addition, it seems a bug in iOS 13 from Apple. You could have a look at this discussion.