How can I pass credentials to a UIWebView?
I have an issue where I am displaying some HTML in a Web View (locally stored) and it is pulling images from a secure server. Normally, in order to view that image by itself in a desktop browser, or even the built in Safari Browser, I get prompted for my Username / Password.
For example, say I have the following HTML:
<img src="http://mysecureserver.example.com/image.png">
If I navigate to http://mysecureserver.example.com/image.png
in a browser, I get prompted for my username / password.
However, when I display the full HTML in a UIWebView
, the rest of the HTML renders properly, but that image does not show up and no errors are thrown.开发者_如何转开发
Therefore, I would simply like to know if I can pass my Username/Password to the Web View so that the container is authenticated and, in theory, now be able to view the image.
Any ideas??
Thank you in advance!!!
also, please note that:
The iPad is already set up to be on a VPN. Even with the iPad set up on the VPN no image is being displayed.
Did you try this: http://www.cs.rutgers.edu/~watrous/user-pass-url.html?
精彩评论