1

It might seem duplicate to you, but as long as my problem is not solved I should ask here for help. I have tried previous given answers but nothing is working for me. So please help me out.

I want to force my UIWebView to load desktop versions of all websites(not the mobile version) and I am using this code, but still I am getting mobile versions of websites.

NSURL *urlValue = [NSURL URLWithString:@"any url here"];
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:urlValue];
    NSString *newUserAgent = @"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7";
    [request setValue:newUserAgent forHTTPHeaderField:@"User_Agent"];
    [webView loadRequest:request];

There might be some problem with my User_Agent string. So your kind help is required.

Ghazanfar Ali
  • 123
  • 1
  • 9

0 Answers0