I have UIWebView page on which there is a button of Login which does login using basic authentication and HTTP POST method call to a server api https://www.abc.com/login. I am not able to detect the the authentication challenge for it through NSURLConnection as specified here Display Authentication Challenge iOS. Because of the reason that authentication request is not the request that is originally loaded in the webview.
The hack to this can be when authentication request is made load a custom url in webview detect that in iOS code and start a new request in iOS with the URL to https://www.abc.com/login which works fine. But is there any other way to do it?