Useful Commands

Capacitor

CommandDescription
npm init @capacitor/appNew Capacitor app
ionic integrations enable capacitorEnable capacitor in Existing Project
npm i @capacitor/app @capacitor/haptics @capacitor/keyboard @capacitor/status-barInstall Capacitor Plugin Dependencies
ionic capacitor add android
ionic capacitor add ios
Add Platforms
ionic cap run android -l --externalRun app with live reload (Android)
ionic cap run ios -l --externalRun app with live reload (iOS)
ionic capacitor copy android --prod && cd android && ./gradlew assembleRelease && cd ..Generate a release APK without opening the android studio
ionic capacitor copy android && cd android && ./gradlew assembleDebug && cd ..Generate a debug APK without opening the android studio
cordova-res --skip-config --copyGenerate icons & splash screen without specifying platform
ionic capacitor copy android && cd android && ./gradlew assembleDebug && ./gradlew installDebug && cd ..Build and run apk directly on the device from CLI