Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-10078

With iPad Pro the wrong userAgent (iPhone) will be saved

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Master, 3.6.3
    • 4.3.0
    • cordova-ios
    • iPad Pro
      iOS 9.1

    Description

      Using UIWebView on an iPad Pro (iOS 9.1) gives you a wrong userAgent, because it says its an iPhone.
      You can reproduce this behavior with the iPad Pro device and with the iPad Pro simulator. In both cases the userAgent is:

      mozilla/5.0 (iphone; cpu iphone os 9_1 like mac os x) applewebkit/601.1.46 (khtml, like gecko) mobile/13b137
      

      This seems to be a known bug with iOS 9.1 on the iPad Pro because it is fixed with iOS 9.2 beta 4 and you are getting the right userAgent.

      If you clean install your app, everything works fine on iOS 9.2 beta 4. But if you update your previously installed app, you are still getting the wrong userAgent because the CDVUserAgentUtil uses the cached userAgent.

      For users it is not possible to clean install the app, because in that case the whole configuration would get lost. To get the right userAgent every time, developers must have the option to disable the caching of the userAgent in their apps.

      Attachments

        Issue Links

          Activity

            People

              kerrishotts Kerri Shotts
              chemm Christian Hemker
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: