I have a website I need to access which requires authentication, which I have accomplished using NSURLConnection, and implementing didReceiveAuthenticationChallenge delegate method. When I try to display the page which requires authentication, all I see is text on a white background, no images or CSS content. The following code snippet is in connectionDidFinishLaunching, where receivedData is the NSMutableData returned from the NSURLConnection.
Has anyone successfully implemented a webview which can display websites that require authentication?
If I try to reload the same page within the connectionDidFinishLoading, I can see static images, but no dynamic content.
The webpage appears as expected in mobile Safari.
Code:
[webView loadData:(NSData *) receivedData MIMEType:@"text/html"textEncodingName:@"UTF-8"baseURL:[ NSURLURLWithString:@"" ]];
Has anyone successfully implemented a webview which can display websites that require authentication?
If I try to reload the same page within the connectionDidFinishLoading, I can see static images, but no dynamic content.
Code:
NSURL *url = [NSURL URLWithString:URLString];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[webView loadRequest:request];