Ionic.Platform.device() returns empty object

I’m on v1.0.0 and I just noticed that ionic.Platform.device() returns window.device which is an empty object. This wasn’t the case before. I’m checking inside $ionicPlatform.ready() I was expecting to get a UUID attribute for the device.

is this a bug or new behavior?

Sorry, forgot to do this

ionic plugin add org.apache.cordova.device

So am I to understand that this resolved your issue?

I have installed and reinstalled the cordova device plugin, I have used the ngCordova Library, I have used ionic.Platform.device(), all wrapped in $ionicPlatform.ready, in a $timeout call, in an ng-init call, I’ve created a custom event listener for when “diviceReady” occurs… and nothing. Every time regardless of my method I get “device not defined”.

In a bit of late night bleary eyed playing I think I came back to my laptop after fetching a cup of tea and saw data was returned, but that may have just been a dream the more I think about it because have NOT been able to reproduce it before or since.

For the record I CAN get the platform and the version from ionic.Platform.platform() and ionic.Platform.version();

But I’d REALLY like to get the devices’ UUID or Serial number… can someone help?

ionic.Platform.device() will return an empty object if you’re accessing it from a web browser. I’ve also noticed that I’ve had issues parsing ionic.Platform.version().uuid directly without assigning it to a variable first, perhaps my lack of understanding of Javascript?

On a side note I noticed you misspelled “device” in “diviceReady”. Does that work?

I appreciate the response but I resolved this issue a while ago.

How did you do it carlduncan?
my ionic.platform runs fine
but problem starts as soon as i start to call any of the functions given in the $cordovaDevice plugin ??