Skip to main content
Version: v8

ionic capacitor build

Build an Ionic project for a given platform

$ ionic capacitor build [platform] [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.

platform

ビルドするプラットフォーム(例:androidios)を指定します。

Options

  • --no-build: Do not invoke Ionic build

  • --no-open: Do not invoke Capacitor open

  • --prod: Flag to use the production configuration

Advanced Options

  • --configuration=<conf>: Specify the configuration to use. (or -c)

  • --source-map: Output source maps

  • --watch: Rebuild when files change

Examples

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