I have a business need to be able to customize the UserAgent for an embedded UIWebView. (For instance, I'd like the server to respond differently if, say, a user is using one version of the app versus another.)
Is it possible to customize the UserAgent in the existing iPhone SDK's UIWebView control the way it is, say, for an embedded IE browser in a Windows app?
It should work with an NSMutableURLRequest as Kuso has written.
You'll have to use NSURLConnection to get the responseData. Set the responseData to your UIWebView and the webView should render: