Ionic run with native components


I’m currently developing an application which utilizes the Geolocation cordova plugin.

So every time I want to test something out on my device am I right in saying that I have to run ‘Ionic run android’ without live reload?

Is it not possible to use live reload on my device and have the native plugins working while doing so?


You should be able to use live-reload now.
Depending on the plugin though, there may be some limitations.
Anything that touches the file-system (like camera, file, file-transfer) wont work because the context of the code is not the device, but the server that is hosting it.

Thanks for the reply.

I’m currently on RC6.

When I use:
ionic run android --livereload --consolelogs

Then have this code in my .ts file

 testLocation() {
    Geolocation.getCurrentPosition().then((resp) => {
    }).catch((error) => {
    console.log('Error getting location', error);

I just receive this error message in the console.

error opening ws message: {"category":"console","type":"log","data":["Error getting location",{}]}

Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.6
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 1.0.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v4.2.1
Xcode version: Not installed