We operate a captive portal WIFI network in a walled-garden setup. There is no public internet access on this network. Users connect to our SSID and can only reach a local resource.
On Android, our captive portal can show a button that launches the devices default browser and navigates to our portal page. We cannot reproduce this on iOS: we can place the button inside the CNA tear sheet but tapping it does not open Safari, the redirect simply does not happen.
I found this older thread describing the same need: https://developer.apple.com/forums/thread/75498
From that thread, it seems the behavior changed several times. It reportedly worked around iOS 11.2 then broke again in later releases.
My questions:
- On current iOS, is it possible to open Safarı or the default browser programmatically from within the CNA? For example, via a link or button after authentication? If yes, what is the supported way?
- If it is not supported, is that intentional? Is there any official documentation describing CNA limitations and the recommended pattern?
- For a walled-garden network with no public Internet, what is Apple's recommended approach to move the user from the CNA into a full browser session?
It’s hard to offer any good advice here, for the reasons I outlined in my general guidance post on that old thread you uncovered. Specifically, I can’t answer a question like this:
what is the supported way?
because AFAIK the behaviour of the captive network subsystem is not documented in this level of detail, and I can only support things that are documented.
Is there any official documentation … ?
Official documentation for the captive network subsystem is very limited. The only thing that I’m specifically aware of is the How to modernize your captive network developer news post. That links to an RFC 7710 draft, which was eventually published as RFC 8910. If you go down that rabbit hole, you’ll also want to read RFC 8952 and RFC 8908. (Indeed, I really need to read them myself!)
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"