Captive Portal Detect

I‘m a computer developer, nowadays I’m researching on captive portal, is there any API to do the captive portal detection or to know whether the wi-fi is captive or not?

Apple platforms support captive networks something like this:

  1. On joining the network, run a test to see if it looks like a captive network. If it doesn’t, bring up the networking normally.

  2. If it does, run the captive network infrastructure. While this is running, the Wi-Fi interface is active but not the default route.

  3. If the captive network infrastructure fails, leave the network.

  4. If it works, and so the network is no longer captive, switch the default route.

With that in mind, let’s answer this questions:

is there any API … to know whether the wi-fi is captive or not?

Not really. If the system is able to detect that the network is captive then a normal app won’t ‘see’ it because it only becomes the default route after the system has successfully authenticated.

Conversely, if the network ‘lies’ successfully, the system won’t see it as a captive network and thus an API wouldn’t help you.

is there any API to do the captive portal detection … ?

An app is able to integrate with the captive network infrastructure via the Hotspot Helper API.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Captive Portal Detect
 
 
Q