Why is WKWebView registering as a mobile device?

So i'm running the following code:


    override func viewDidLoad()
    {

        if let url = URL(string: "https://www.directvnow.com") {
            let request = URLRequest(url: url)
            webview.load(request)
        }


The result is the view loading the webpage and saying the following "please rotate your phone we look better upright"... This is running on a MAC so why the heck is it even displaying a mobile interface?

You don't know that the load request is sending out 'iphone' in forHTTPHeaderField:@"User-Agent". You ony know that the responder is responding as if it received that 'iPhone' in the User-Agent field. The fault may be in the responder.

Could you explain a little more? Espn, Twitch, Youtube load the correct interfaces but this does not.


        self.webview!.uiDelegate = self
        webview.customUserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
        //load URL here
        let url = NSURL(string: "http://www.directvnow.com")!
        webview.load(URLRequest(url: url as URL))
        self.view.addSubview(webview)
s URL))
        self.view.addSubview(webview)

even with this it loads the same result.

Why is WKWebView registering as a mobile device?
 
 
Q