A technology demonstrator that will experiment with using CapacitorJS to build cross-platform mobile apps.
npm install -g @capacitor/cli
or equivalent- Follow steps in https://capacitorjs.com/docs/getting-started/environment-setup for any platforms you're interested in.
npx cap add [android|ios|electron
You need JDK 11 or higher to gradle build it. Download JDK's from: https://www.oracle.com/java/technologies/downloads
- You need xCode 13+ to run Capacitor
- To install xCode 13+, you need MacOS 13+
- MacBook Pros prior to 2017 are not compatible with macOS 13.
- Edit the code
yarn build
or equivalent.npx cap sync
npx cap run [android|ios
- Edit the code
yarn build
or equivalent.npx cap sync @capacitor-community/electron
npx cap open @capacitor-community/electron
Prerequisites:
npm install -g @ionic/cli native-run
Workflow
ionic cap run android -l --external
- Select the device/emulator and Wi-Fi network to use. (They should be on the same WiFi network as the development machine)
- If you edit a .tsx file and save it, the app should automatically reload.
See https://capacitorjs.com/docs/guides/live-reload for more info.