Page tree
Skip to end of metadata
Go to start of metadata

Before you begin, make sure you that have PhoneGap/Cordova/Ionic CLI (command-line interface) set up and the corresponding platform tools such as XCode Tools or Android SDK installed. WebStorm uses the features provided by these CLIs to create and run PhoneGap, Apache Cordova, and Ionic mobile applications.

Configuring the executable path

On the WebStorm Welcome screen, click ConfigurePreferences to open WebStorm default preferences. Navigate to Languages and FrameworksJavaScriptPhoneGap/Cordova configuration and specify the path to the Cordova, PhoneGap, or Ionic executable (command-line interface).

Creating or opening an application

To create a new application, click Create New Project on the IDE Welcome screen and select PhoneGap/Cordova App from the list.

To open an existing PhoneGap/Cordova/Ionic application, simply click Open on the Welcome screen or go to the menu FileOpen and then select the application folder.

The IDE will automatically exclude the platforms directory from the project scope. This directory will contain native applications for the selected mobile platforms generated by Cordova, PhoneGap, or Ionic after you build your application.

The structure of the application might vary depending on whether you are using Cordova, PhoneGap, or Ionic.

Running an application

To run and deploy an application, you need to create a new PhoneGap/Cordova Run configuration.

Click Edit configurations in the top right-hand corner of the IDE window or in the main menu Run. Сlick + to add a new configuration and choose the PhoneGap/Cordova type.

You can select the command you'd like to execute (you can read about these commands in the Apache Cordova documentation):

  • run;
  • prepare;
  • emulate;
  • serve.

From the Platform drop-down list, select the platform that you'd like to build the application for. Note that the contents of the list of supported platforms may differ depending on the version of PhoneGap, Cordova, and Ionic.

Additionally, you can specify the device type that you'd like to build your application for in the Target field.

Once the configuration is saved, click the Run button for the created Run configuration in the top right-hand corner of the IDE:

In the Run tool window that appears after the application is started you can find the execution output and logs:

  • No labels