Get device uuid


#1

Hi ! :smiley:

Iā€™m getting problem while Iā€™m trying to get the device UUID.

At the first launch I cannot access to my UUID, but at the second I can.

.run(function ($ionicPlatform) {

  $ionicPlatform.ready(function() {

    var device = ionic.Platform.device();
    var uuid = device.uuid;
    localStorage.setItem("uuid", uuid);

  });
})

How can I access to it at the 1st launch?

Idea?

Thanks :slight_smile:


#2

Whereas ionic.Platform.platform() work at the first launch.