I am using the new OSX 10.10 (beta 3) (and iOS 8) API WKWebView and I cannot force it to load mobile sites, in particular www.google.com and www.youtube.com .
I used NSMutableURLRequestlike this:
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setValue:@"mozilla/5.0 (iphone; cpu iphone os 7_0_2 like mac os x) applewebkit/537.51.1 (khtml, like gecko) version/7.0 mobile/11a501 safari/9537.53"
forHTTPHeaderField:@"User-Agent"];
[self.webView loadRequest:request];
Whenever I use this to download one of the above websites, I switch to the desktop version of the website.
source
share