I was using Cordova diagnostic plugin-https://github.com/dpa99c/cordova-diagnostic-plugin , added it using meteor add cordova:cordova.plugins.diagnostic@1.1.0 , i wrote the code like below as mentioned in plugin github readme
if (Meteor.isCordova) {
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady(){
cordova.plugins.diagnostic.isLocationEnabled(function(enabled){
console.log("Location is " + (enabled ? "enabled" : "disabled"));
}, function(error){
console.error("The following error occurred: "+error);
});
}
}
But i am getting error in terminal while running cordova app as shown below
Uncaught TypeError:Cannot read Property ‘diagnostic’ of undefined
Any help on how to use this plugin in meteor.