Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

device.uuid=NULL on IOS 12.3.1 #103

Open
sitehost opened this issue Jun 26, 2019 · 9 comments
Open

device.uuid=NULL on IOS 12.3.1 #103

sitehost opened this issue Jun 26, 2019 · 9 comments

Comments

@sitehost
Copy link

Problem

using device.uuid on IOS 12.3.1 returns all as NULL

'Device Name: ' + device.name + '
' +
'Device Cordova: ' + device.cordova + '
' +
'Device Platform: ' + device.platform + '
' +
'Device UUID: ' + device.uuid + '
' +
'Device Version: ' + device.version + '
';

What is expected to happen?

on IOS 12.2 device.uuid will display the correct uuid, however on IOS 12.3.1 they return NULL.

What does actually happen?

device.uuid returns a NULL

Information

working from a cordova build, it has worked on all of our devices until we did an update to 12.3.1 . What is the work around, or a solution to gather the IOS uuid

Command or Code

run device.uuid on 12.3.1 and on 12.2.1

Environment, Platform, Device

Version information

Checklist

  • [x ] I searched for existing GitHub issues
  • [ x] I updated all Cordova tooling to most recent version
  • [x ] I included all the necessary information above
@janpio
Copy link
Member

janpio commented Jun 26, 2019

What would be the "correct uuid"?
What is the iOS code necessary to get that?

@sitehost
Copy link
Author

well its not giving any UUID from the device. it works on ios < 12.1 but on later updates its giving NULL

@janpio
Copy link
Member

janpio commented Jun 28, 2019

Yes, I understood that.
I am asking what is a UUID for the device under iOS 12.3 and what native code Apple provides to get it.

@sitehost
Copy link
Author

It's a unique device Id. And I am not sure. I'm using this plugin. The code for this plugin to get it is device.uuid in javascript

@timbru31
Copy link
Member

I can't reproduce this issue.

Is this reproducible in a new, plain Cordova app? A minimal reproduction repository would really help to debug and later fix this issue. More information on how to create one: https://github.com/apache/cordova-contribute/blob/master/create-reproduction.md

@janpio janpio added the support label Jul 12, 2019
@XieXiRong
Copy link

yes, it is a big problem. not work after ios 12.2

sorry it is my fault,actually the method is work in ios version 12.2 and 12.3

@jcesarmobile
Copy link
Member

I can't reproduce neither, even if trying to return NULL or nil from native makes the app crash instead of returning NULL, the only way of returning a null value is by returning [NSNull null], but that returns null, not NULL.

Anyway, looks like the identifierForVendor can return nil in rare cases, that could cause a crash as mentioned earlier

If the value is nil, wait and get the value again later. This happens, for example, after the device has been restarted but before the user has unlocked the device.

https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor

@cyptus
Copy link

cyptus commented Jul 24, 2019

i got the same issue, plugin is not working anymore after ios 12.3.1

@JoshuvaGeorge03

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants