In my app i want to get the device uuid or udid so that i can save it in my database.
for my android app when i run this code in my js file
.factory('Service', function($state) {
var service = {
login: function(user, new_device_status) {
if(window.cordova) {
var params = {
organization: user.orgCode.$modelValue,
email: user.email.$modelValue,
password: user.password.$modelValue,
device_uuid: window.device.platform == 'Android' ? window.device.uuid : window.device.udid,
new_device: new_device_status
};
}
}
}
})
it works and returns the uuid of the device but in my ios app when i try this it doesnt work or when i try
window.device.udid
it still doesnt work in my ios simulator. what can i do?