Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you make an iOS app launch a captive portal (hotspot login)?

When using Safari at a place with a captive portal like Starbucks, iOS devices will launch a special modal webview to authenticate with the portal. I've seen third party apps trigger this so it's possible to do outside of Safari but I don't know how. It doesn't seem to come for free just by using Reachability or making a network request.

Edit: The best I can say is the answer I accepted works sometimes. It's probably the right answer but I don't know why it's not consistent. It can take several network attempts before it will launch the captive portal.

like image 296
Dylan Avatar asked Oct 28 '10 17:10

Dylan


People also ask

How do you trigger a captive portal on iPhone?

Force Open a Captive Portal on Mac, iPhone, iPad. The simplest way to forcibly reopen a captive portal wi-fi login page is to go to the following URL in Safari on your device: Go to http://captive.apple.com/hotspot-detect.html in Safari. This should immediately find the captive portal and force it to open.

How do I enable captive portal login?

Select the network location that has your access point. Click Wireless > Settings. Click the pencil symbol to the right of the SSID that you want to edit. Click Enable Captive Portal.

How does iOS detect captive portal?

Traditionally, captive networks rely on intercepting traffic from the person connected. By default, iOS and macOS automatically send a probe when joining your network for the first time to detect this interception, and display the captive portal login page.


1 Answers

Is UIRequiresPersistentWiFi set in your plist file? That is the only public API available to devs to indicate WiFi need.

like image 137
Matthew Leffler Avatar answered Oct 22 '22 06:10

Matthew Leffler