is It possible with Network extension Framework to connect a unknown Wifi without user interaction?

I have two questionds about Netwoek extension Framework.


1 - is It possible with Network extension Framework to connect a unknown Wifi without user interaction?.


2 - The background process NEHotspotHelper is It called only when the user enter to Wifi settings? Or is It called when the iOS searches for networks too?


Thank you.

Replies

1 - is It possible with Network extension Framework to connect a unknown Wifi without user interaction?.

Yes.

2 - The background process NEHotspotHelper is It called only when the user enter to Wifi settings? Or is It called when the iOS searches for networks too?

Yes. Your hotspot helper is called by the OS at various times so that the OS can determine which hotspot helpers can deal with which networks.

IMPORTANT NEHotspotHelper was designed to enable apps that help the user navigate a hotspot (that is, a network where access to the wider Internet is gated by some authentication process). You should only continue to pursue this path if that accurately describes your intended use case.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Thanks you for answering.

I have doubt about the first point. When I am trying to connect an a new hotspot I receive a caller in my hotspot helper with kNEHotspotHelperCommandTypeFilterScanList state.

Here I can set the confidence and the password of a known hotspot for my app.

But for continuing to the next state kNEHotspotHelperCommandTypeEvaluate, the user has to touch my Wifi for get a connection... so, is there something that I have to set in the kNEHotspotHelperCommandTypeFilterScanList for get the connection without the user has to touch the Wifi?

Hello Eskimo,
KIndly clear me on some point:
1 - is It possible with Network extension Framework to configure a unknown Wifi (passpoint profile) without user interaction?. like

I'm using NEHotspotConfigurationManager with on iOS 11 iPhone to connect to specific Wi-Fi.

Here is the code:


let domainName = ""
let hotspotSettings = NEHotspotHS20Settings.init(domainName: domainName, roamingEnabled: true)
let hotspotEAPSettings = NEHotspotEAPSettings()
hotspotEAPSettings.username = *****
hotspotEAPSettings.password = ******
hotspotEAPSettings.isTLSClientCertificateRequired = true
hotspotEAPSettings.supportedEAPTypes = [21]
hotspotEAPSettings.trustedServerNames = [""]
hotspotEAPSettings.ttlsInnerAuthenticationType = .eapttlsInnerAuthenticationMSCHAPv2
print(hotspotEAPSettings)
let hotspotConfig = NEHotspotConfiguration.init(hs20Settings: hotspotSettings, eapSettings: hotspotEAPSettings)
print( hotspotConfig.ssid)
NEHotspotConfigurationManager.shared.apply(hotspotConfig) {[unowned self] (error) in
print(error?.localizedDescription as Any)// gives Error Domain=NEHotspotConfigurationErrorDomain Code=5 "invalid EAP settings."
print(error as Any)
if let error = error {
self.showError(error: error)
} else {
self.showSuccess()
}
}

Question is: what happened? Why it prompts me error "invalid EAP settings", and also what does this error mean?
Please go on :

NEHotspotConfigurationErrorDomain Code=5 “invalid EAP settings.”


Kindly help me out

Again, I’m going to recommend that you open a new thread for this question rather than glom on to some old thread.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"