iphone - UIWebView does not persist authentication on iOS3.2/iOS4 -


I have created an application that uses UIWebView to display a site that uses basic authentication. After the iOS 3.2 (on both the iPhone and the iPad) the content was stopped showing.

My approach to authenticating users is:

  1. Create an NSURLConnection
  2. Resolve the authentication challenge to provide the credentials
  3. Implement the response responses to receive feedback and load the request in a UIWebView, i.e. [webView loadRequest:]

Anytime iOS3.2, authentication was broken; UIWebView does not investigate any more against shared credential storage.

For the iPhone on the IOS, I worked stupidly on this issue, which included the login informatino in the URL (i.e.) the initial load request for the webview.

For IOS3.2 on the iPad, this is not sufficient initial request all rights have been certified, but subsequent calls are still not authenticated.

Any suggestions?

use setDefaultCredential: forProtectionSpace : shared NSURLCredentialStorage < On the / code> the webview still uses the default credentials, when you use the setCredential, it does not work: the security place for .


Comments