I did handle for no Internet on my app on the "didFailWithError".
But customers started contacting about their app not work as expected at a coffee shop. I tried for myself and realized that they had Internet, but I did not receive the expected result from the "connectionDidFinishLoading". It was because it redirected all traffic to a login page, where they would want payment or authentication before you can use the Internet. So the Internet was technically connected. And Reachability still says it can find the address.
So I implemented the "willSendRequest" to fix this, but then I went by a nearby hotel and it redirected the page, but it did not change the URL. So it didn't trigger the "willSendRequest" delegate.
Is there an elegant way to handle these types of scenarios? I could put more error handling in my "connectionDidFinishLoading", but I don't want to waste bandwidth receiving a response from a login page, I'd like to cancel that connection as soon as possible. I'm making HTTP requests to my server which is returning xml. But if it is unexpectedly being redirected, it screws up the parsing logic of course.
But customers started contacting about their app not work as expected at a coffee shop. I tried for myself and realized that they had Internet, but I did not receive the expected result from the "connectionDidFinishLoading". It was because it redirected all traffic to a login page, where they would want payment or authentication before you can use the Internet. So the Internet was technically connected. And Reachability still says it can find the address.
So I implemented the "willSendRequest" to fix this, but then I went by a nearby hotel and it redirected the page, but it did not change the URL. So it didn't trigger the "willSendRequest" delegate.
Is there an elegant way to handle these types of scenarios? I could put more error handling in my "connectionDidFinishLoading", but I don't want to waste bandwidth receiving a response from a login page, I'd like to cancel that connection as soon as possible. I'm making HTTP requests to my server which is returning xml. But if it is unexpectedly being redirected, it screws up the parsing logic of course.