iPhone NSURLConnection pop-up for entering user/password requested?

I observed in a Hotel I am that when other apps trying to access the internet a pop-up appears that ask the iPhone user to enter the user id and password of the Hotel's Wireless LAN. I guess it is some kind of redirect on all requests to protect misuse of the WLAN.

I have an app and it does use the NSURLConnection but I am not getting the pop-up instead it goes via the regular data network of the carrier. I removed the SIM to see what happens then and then the connection fails with an error "The Internet connection appears to be offline".

I wonder whether this is because the NSURLConnection does not provide such a pop-up and this other apps (e.g. Safari, e.g. WhatsApp) use a different API. One the other hand I thought that might be what the documentation says is the "Authorization Challenge". I have implemented those delegate methods but they are not called.

If someone with some experience on this can help me.

Answers


Search the documentation for the UIRequiresPersistentWiFi Info.plist key - there are some tradeoffs (users will get an alert every time they open your application if their phone is in Airplane Mode - doesn't seem to be any way to turn that off) but that should force it to make the connection.


Need Your Help

CSS selector for element within element with inline style?

html css css-selectors inline-styles

Is there a CSS selector to target elements with inline styles? So can I target the first span but not the 2nd with CSS only?

Facebook API wall post method fires onComplete for both Post and Cancel?

android facebook-graph-api

I'm not sure if I'm doing something wrong or if this is a bug in the Facebook API but in my callback for a Facebook wall post the onComplete gets fired regardless of if I press "POST" or if I press

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.