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

userAgent incorrect in iOS simulator

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.9.0
    • 3.4.0
    • cordova-ios
    • None
    • iOS 6.1 simulator from xCode 4.6.3, running as an iPhone

    Description

      If I launch a Cordova/PhoneGap app on the iOS 6.1 simulator, running in iPhone mode, and inspect it with Safari on the Mac, the value of navigator.userAgent is:

      "Mozilla/5.0 (iPad; CPU OS 6_1 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Mobile/10B141 (187887888)"

      Note that it says "iPad", although it should be "iPhone".

      If I launch Safari in the same simulator, the userAgent string is:

      "Mozilla/5.0 (iPhone; CPU iPhone OS 6_1 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10B141 Safari/8536.25"

      Attachments

        Activity

          People

            agrieve Andrew Grieve
            jweber Jacob Weber
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: