I am writing an iOS app that used a HTTP web service to get its data. If a user is connected to a WiFi network that requires the user login using some kind of web form (think Starbucks or Wi-Fi at airports) then my app fails with an error 500.
I notice Safari can detect this and launches the authentication page for the user. Is there a standard I can use on to provide this experience, or at least show the user a message asking them to open safari and log in?
The basic method is: try to download a file somewhere, that you know will never move, and whose contents you already know. Compare the downloaded content with the content that should be downloaded, and you’ll know you’re on a captive hotspot or not.