ionic capacitor run

Contents

Run an Ionic project on a connected device

ionic capacitor run <platform> [options]

ionic capacitor run will do the following:

  • Perform ionic build (or run the dev server from ionic serve with the --livereload option)
  • 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, the app can run on devices and emulators/simulators using the native IDE. Unfortunately, programmatically building and launching the native project is not yet supported.

For Android and iOS, you can setup Remote Debugging on your device with browser development tools using these docs.

Examples

ionic capacitor run ionic capacitor run androidionic capacitor run android -lionic capacitor run ios --livereloadionic capacitor run ios --livereload-url=http://localhost:8100

Inputs

platform

Description

The platform to run (e.g. android, ios)

Options

--no-build

Description

Do not invoke Ionic build

--livereload

Description

Spin up dev server to live-reload www files

Aliases-l

--livereload-url=<url>

Description

Provide a custom URL to the dev server

--prod

Description

Flag to use the production configuration

--ssl

Description

Use HTTPS for the dev server

Advanced Options

--address=<address>

Description

Use specific address for the dev server

Default0.0.0.0

--port=<port>

Description

Use specific port for HTTP

Aliases-p
Default8100

--source-map

Description

Output source maps

--configuration=<conf>

Description

Specify the configuration to use.

Aliases-c

--devapp

Description

Publish DevApp service