Skip to main content

ionic cordova prepare

Copies assets to Cordova platforms, preparing them for native builds

$ ionic cordova prepare [options]

ionic cordova prepare will do the following:

  • Perform an Ionic build, which compiles web assets to www/.
  • Copy the www/ directory into your Cordova platforms.
  • Transform config.xml into platform-specific manifest files.
  • Copy icons and splash screens from resources/ to into your Cordova platforms.
  • Copy plugin files into specified platforms.

You may wish to use ionic cordova prepare if you run your project with Android Studio or Xcode.

Examples#

$ ionic cordova prepare
$ ionic cordova prepare ios
$ ionic cordova prepare android

Inputs#

platform

Description

The platform you would like to prepare (e.g. android, ios)

Options#

--no-build

Description

Do not invoke an Ionic build

--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