Home > Software engineering >  What is the command to run ionic/capacitor app on device with live reload for android and ios
What is the command to run ionic/capacitor app on device with live reload for android and ios

Time:10-13

I have ionic capacitor project and I am trying to run it on device. Need help for android livereload debugging as i am using windows machine

CodePudding user response:

Making sure that we have already setup jdk and android studio. We give following commands:

For android :

  1. ionic cap add android
  2. ionic cap sync
  3. ionic cap build android
  4. ionic cap run android --external -livereload
  5. Choose the device to deploy app. If your device is connected to pc then select the your device name else select from the list of emulators

The compiled android project might open on android studio for generating apk build. Even then you can hit run button to see the app on device.

For ios:

  1. ionic cap add ios
  2. ionic cap sync
  3. ionic cap build ios
  4. ionic cap run ios --external -livereload
  5. Choose the device to deploy app. If your device is connected to pc then select the your device name else select from the list of simulators

The compiled ios project might open on xcode studio for generating ipa build. Even then you can select simulator to see the app on device.

NOTE: All commands with respect to ionic 5 and above.

  • Related