문제

I have a cordova ios app. I use the UUID frequently in my app but now its not working it gets stuck at the alert that displays it.

onDeviceReady: function() {
    alert("On device Ready"); // Hits this and thats it
    alert(device.window.uuid); //does not display this and does not go on
    app.receivedEvent('deviceready');
},

as well as when I do: alert(device.window.uuid);

var pushNotification = window.plugins.pushNotification;

도움이 되었습니까?

해결책

Try this:

alert(device.uuid);

http://docs.phonegap.com/en/3.3.0/cordova_device_device.md.html#device.uuid

If that doesn't work and you are building locally, make sure to run:

cordova plugin add org.apache.cordova.device
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top