Skip to main content
Version: v6

ionic capacitor build

Build an Ionic project for a given platform

$ ionic capacitor build [options]

ionic capacitor build will do the following:

  • Perform ionic build
  • Copy web assets into the specified native platform
  • Open the IDE for your native project (Xcode for iOS, Android Studio for Android)

Once the web assets and configuration are copied into your native project, you can build your app using the native IDE. Unfortunately, programmatically building the native project is not yet supported.

To configure your native project, see the common configuration docs as well as low-level configuration for iOS and Android.

Examples

$ ionic capacitor build 
$ ionic capacitor build android
$ ionic capacitor build ios

Inputs

platform

Description

The platform to build for (e.g. android, ios)

Options

--no-build

Description

Do not invoke Ionic build

--no-open

Description

Do not invoke Capacitor open

--prod

Description

Flag to use the production configuration

Advanced Options

--configuration =<conf>

Description

Specify the configuration to use.

Aliases-c

--source-map

Description

Output source maps

--watch

Description

Rebuild when files change