Useful Commands
Capacitor
Command | Description |
---|---|
npm init @capacitor/app | New Capacitor app |
ionic integrations enable capacitor | Enable capacitor in Existing Project |
npm i @capacitor/app @capacitor/haptics @capacitor/keyboard @capacitor/status-bar | Install Capacitor Plugin Dependencies |
ionic capacitor add android ionic capacitor add ios | Add Platforms |
ionic cap run android -l --external | Run app with live reload (Android) |
ionic cap run ios -l --external | Run 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 --copy | Generate 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 |
Updated about 1 month ago