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

device is not populated in iOS 5.1.1

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: cordova-plugin-device
    • Labels:
    • Environment:

      iOS 5.1.1

      Description

      The device plugin doesn't work in iOS 5.1.1 because the unique device identifier uses identifierForVendor to get the device uuid. However this is not valid in iOS older than 6.0.

      In the method uniqueAppInstanceIdentifier, there is a reference to maintaining backward compatibility for versions that didn't use identiferForVendor. Unfortunately the code only works if the app had previously been installed on that device (because it looks for the CDVUUID that was previously stored on the device). If the install is new, this app_uuid is nil and it tries to use identifierForVendor.

      I realize that iOS 5 is no longer supported in Cordova, but since the code attempts to be backward compatible (based on the inline comments), I figured this could be fixed with a few lines of code (which I have done and will submit shortly).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              agilethomas Thomas Allen
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: