2 Replies
      Latest reply on Jan 27, 2020 12:07 PM by aearmstrong
      Fancs Level 1 Level 1 (0 points)

        My sample app request user agent as <Mozilla / 5.0 (iPad; CPU OS 13_0 like Mac OS X) AppleWebKit / 605.1.15 (KHTML, like Gecko) Mobile / 15E148> on WKWebView, iPadOS 13.

        Then response received via didFinishNavigation, user agent has changed to <Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko)>.



        It doesn't happen if witdh of WKWebView is less than 375.



        Is this a Bug or New Specification?

        • Re: WKWebView UserAgent changes on iPad
          neal1 Level 1 Level 1 (10 points)

          I too have observed that if safari or an app with a wkwebview is split paned with an another app and the first app's width is compact, the displayed website will load the mobile version of the site. Ditto for bringing up Safari or a WKWebView app in a compact width popup. Resizing the safari or app w/WKWebView to a regular width causes  the desktop version to be loaded.


          I think this is a feature, but am not 100% certain.



          • Re: WKWebView UserAgent changes on iPad
            aearmstrong Level 1 Level 1 (0 points)

            Are there any news on this (maybe with the latest version of iOS 13.3?) - not being able to set the userAgent makes it difficult to request the mobile version of a web page.