Getting started
React setup
Install the tools and run the Ionic React version. It uses Capacitor instead of Cordova.
Install the tools#
- Download and install Node.js (12.x LTS) for your operating system.
- Download and install Visual Studio Code.
- Make Google Chrome your default browser.
Install Ionic and Capacitor#
In the Visual Studio Code terminal, run:
npm install -g ionic
npm install -g @capacitor/cli @capacitor/core
npx cap init
If some packages fail or are missing, run npm audit fix.
Install the project's packages#
In the project folder, run:
npm install
On a Mac, if you get "permission denied", run this instead:
sudo npm install --unsafe-perm=true --allow-root
Then run this required command:
npm rebuild node-sass
Add the platforms#
npx cap add android
npx cap add ios
Most plugins the app uses are added automatically. A few need your own IDs and are added by hand, such as Facebook and AdMob with your APP_ID and APP_NAME. See Integrations.
More: Ionic documentation.