- install ionic cli using
npm install -g @ionic/cli
- ionic start, choose the type of app (js, angular, ios, vue) or
ionic start ionic-react-electron-app tabs --type=react --capacitor
- startup steps to start with a new react app: here
- you need below toolings. (cordova-res for copying icons and splash screens, check here)
npm install -g native-run cordova-res
- run using
npm run start
- build steps are as mentioned for this app.
This Ionic app supports android, ios and electron build. electron build can be used to create windows or mac setup files (exe or dmg). clone this repo and......
Use the package manager npm to install.
npm install
ionic build
- android
npx cap add android
- ios
npx cap add ios
- electron
npx cap add @capacitor-community/electron
npx cap sync
- ionic build
- npx cap add android (if not added already, else skip)
- npx cap sync (only if you did any code change after adding the platform)
- npx cap open android (opens build in android studio, you need android studio and gradle installed)
- build an apk like any other android native code. Tools -> build apk / build signed apk
- ionic build
- npx cap add ios (if not added already, else skip)
- npx cap sync (only if you did any code change after adding the platform)
- npx cap open ios (opens build in code, u need xcode tools installed)
- create your ios build like any native ios app.
- ionic build
- npx cap add @capacitor-community/electron (if not added already, else skip)
- npx cap sync (only if you did any code change after adding the platform)
- if you don't want to create an executable and just look at how your electron app works:
npx cap open @capacitor-community/electron
- open electron directory created with previous step.
cd electron
- inside electron directory, create windows build
npm run electron:build-windows
- inside electron directory, create mac build
npm run electron:build-mac