Display Authentication dialog in WebView

cocoa-touch, ios, iphone, uiwebview

Solution

I think it is because of some firewall settings by that link authorities.thats why they are asking for authorisation.i am trying to load that in my webview i wont get anything .it is not loading

go for this

[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"http://members.easynews.com"]];  

instead of loading it in to webview or else are loading i this manner

  - (void)viewDidLoad {
     [super viewDidLoad];
    webView.delegate = self;
      NSURL *url = [NSURL URLWithString:@"http://www.google.com"]; 
      NSURLRequest *request = [NSURLRequest requestWithURL:url]; 
      [webView setScalesPageToFit:YES];         
      [self.webView loadRequest:request];               
    }

add this new method in your class

- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error
{
   NSLog("Error : %@",error);
}

I hope you have connected webView object with its outlet in Interface builder?

Problem

I have a webView which will display the https url. I am trying to open a https url which will provide a authentication dialog like this http://members.easynews.com/ . In Mac, it is opening as dialog box, even in iPhone safari browser it is displaying as dialog box. But in webview , it is not displaying the dialog box. How to display that dialog box in webView ??

Original source

Related problems