1// if you didn't run before
2ionic build
3// then
4npx cap add android
5npx cap sync
1npm install call-number
2npm install @ionic-native/call-number
3ionic cap sync
1//New Ionic Project
2ionic start myApp tabs --capacitor
3cd myApp
4
5//Existing Ionic Project
6cd myApp
7ionic integrations enable capacitor
8
9//initialize Capacitor with your app information
10//Note: npx is a new utility available in npm 5 or above that executes local binaries/scripts to avoid global installs.
11npx cap init [appName] [appId]
12//where appName is the name of your app, and appId is the domain identifier of your app (ex: com.example.app).
13//Note: Use the native IDEs to change these properties after initial configuration.
14
15//Build your Ionic App
16//You must build your Ionic project at least once before adding any native platforms.
17ionic build
18//This creates the www folder that Capacitor has been automatically configured to use as the webDir in capacitor.config.json.
19
20//Add Platforms
21npx cap add ios
22npx cap add android
23//Both android and ios folders at the root of the project are created. These are entirely separate native project artifacts that should be considered part of your Ionic app (i.e., check them into source control, edit them in their own IDEs, etc.).
24
25//Open IDE to build, run, and deploy
26npx cap open ios
27npx cap open android
28//The native iOS and Android projects are opened in their standard IDEs (Xcode and Android Studio, respectively). Use the IDEs to run and deploy your app.
29
30//Syncing your app with Capacitor
31//Every time you perform a build (e.g. ionic build) that changes your web directory (default: www), you’ll need to copy those changes down to your native projects:
32npx cap copy