You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/02/17 00:22:18 UTC

[jira] [Commented] (CB-10631) device is not populated in iOS 5.1.1

    [ https://issues.apache.org/jira/browse/CB-10631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15149498#comment-15149498 ] 

ASF GitHub Bot commented on CB-10631:
-------------------------------------

GitHub user agilethomas opened a pull request:

    https://github.com/apache/cordova-plugin-device/pull/49

    CB-10631 ios: Fix for device.uuid in iOS 5.1.1

    - Check if identifierForVendor exists and if not create a new UUID
      and store in on the device for future use.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/agilethomas/cordova-plugin-device CB-10631cordova-plugin-device

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-device/pull/49.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #49
    
----
commit b31206dd6566548337a63c26b87f4c03fcaacbad
Author: Thomas Allen <th...@agilelaw.com>
Date:   2016-02-16T20:12:24Z

    CB-10631 ios: Fix for device.uuid in iOS 5.1.1
    
    - Check if identifierForVendor exists and if not create a new UUID
      and store in on the device for future use.

----


> device is not populated in iOS 5.1.1
> ------------------------------------
>
>                 Key: CB-10631
>                 URL: https://issues.apache.org/jira/browse/CB-10631
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Device
>         Environment: iOS 5.1.1
>            Reporter: Thomas Allen
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> 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).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org