I’ve installed the Diagnostic plugin, following the Ionic Native install instructions:
$ ionic cordova plugin add cordova.plugins.diagnostic $ npm install --save @ionic-native/diagnostic
I’ve also added Diagostic to my app.module.ts file.
When running the app in browser and Ionic DevApp (using ionic serve) i get the message:
console.warn: Native: tried calling Diagnostic.isGpsLocationEnabled, but the Diagnostic plugin is not installed. console.warn: Install the Diagnostic plugin: 'ionic cordova plugin add cordova.plugins.diagnostic'
I thought this might be due to the fact that I’m not running it on an actual device or emulator, but i was wrong. Running it on an iPhone or iPhone emulator gives me the exact same message as above.
I’ve tried to reinstall the plugin several times, and also reinstall the iOS platform several times, with no luck. It keeps telling me that the plugin is not installed.
Has anyone seen this behavior before, and does any of you have a workaround for it?
Thanks in advance.