DEV Community

Ridwan Kasim
Ridwan Kasim

Posted on • Edited on

10

Useful Ionic + Capacitor commands

  • Run app with live reload (Android)
ionic cap run android -l --external
Enter fullscreen mode Exit fullscreen mode
  • Run app with live reload (iOS)
ionic cap run ios -l --external
Enter fullscreen mode Exit fullscreen mode
  • How to generate a release APK without opening the android studio
ionic capacitor copy android --prod && cd android && ./gradlew assembleRelease && cd ..     
Enter fullscreen mode Exit fullscreen mode
  • How to generate a debug APK without opening the android studio
ionic capacitor copy android && cd android && ./gradlew assembleDebug && cd ..
Enter fullscreen mode Exit fullscreen mode
  • How to generate icons & splash screen without specifying platform
cordova-res --skip-config --copy
Enter fullscreen mode Exit fullscreen mode
  • How to build and run apk directly on the device from CLI
ionic capacitor copy android && cd android && ./gradlew assembleDebug && ./gradlew installDebug && cd ..
Enter fullscreen mode Exit fullscreen mode

I will be updating this post with more useful commands. Thank you for reading!!!

Top comments (0)

nextjs tutorial video

Youtube Tutorial Series 📺

So you built a Next.js app, but you need a clear view of the entire operation flow to be able to identify performance bottlenecks before you launch. But how do you get started? Get the essentials on tracing for Next.js from @nikolovlazar in this video series 👀

Watch the Youtube series