I am using the hotspot helper to provide passwords to some secure networks. For this purpose, everything works fine, but I also want to present the captive portal in open networks with it.
Looking at this guide(see part "Sequence when network is captive and UI is required"), I understand that, when receiving Authenticate command I should be able to determine whether the network is captive or not(*), and based on that I should return success or UIRequired response. The problem is that I don't have network access at this point(I get -1009 error code from my request). I only get it after delivering the response. As stated in the link above, in case of captive portal(I need network access to determine it, and don't have it before delivering the response to the .Authenticate command) I should post a local notification, return UIRequired to the hotspot helper, and once the captive webpage is presented return success to the PresentUI command I would get.
Am I doing anything wrong? Is presenting the captive webpage not possible / recommended on iOS?
* I am doing this with a request to a known endpoint and checking if the response is the expected one or not; if it is, there is no captive portal, if it is not, there is. Is this the recommended way?