Load desktop version WKWebView iOS 9
Up until recently let url = NSURL (string:http://asite.com) let request = NSMutableURLRequest(URL: url!) //iOS loads the mobile version of asite.com which does not have the required DOM so we force the desktop version by setting new value forHTTPHeadrField let newUserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.6 Safari/537.11" request.setValue(newUserAgent, forHTTPHeaderField: "User_Agent") let config = WKWebViewConfiguration() //even though we dont need to see it the webpage needs to appear but we set its frame to CGRectZero