I'm creating an app on Swift, and I need to know, if there's any way I can programatically auto connect an iPhone to a WiFi giving as paremeters the SSID and the Password from that WiFi Network.
Thanks in advance.
Below code will work on Xcode 9 and iOS 11
let WiFiConfig = NEHotspotConfiguration(ssid: "Mayur1",
passphrase: "123456789",
isWEP: false)
WiFiConfig.joinOnce = false
NEHotspotConfigurationManager.shared.apply(WiFiConfig) { error in
// Handle error or success
print(error?.localizedDescription)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With