سؤال

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