iOS Shell Tool Guide

This guide shows how to use Cordova's set of platform-centered shell tools to develop iOS apps. This development path, discussed in the Overview, may offer you a greater range of development options for iOS than the cross-platform CLI tool described in The Command-Line Interface. For example, you need to use shell tools when deploying a custom Cordova WebView alongside native components. Before using either development path, you must first configure the SDK environment as described in the iOS Platform Guide. These tools rely upon Xcode's command-line tools such as xcode-select and xcodebuild.

To enable shell tools for iOS, download Cordova from cordova.apache.org. The download contains separate archives for each platform. Expand each you wish to target, ios in this case. The relevant tools are typically available in the top-level bin directory, otherwise consult the README file for more detailed directions.

These tools allow you to create, build, and run iOS apps. For information on the additional command-line interface that enables plugin features across all platforms, see Using Plugman to Manage Plugins. See Application Plugins for details on how to develop plugins.

Create a Project

Run the create command, specifying the existing path to the project, the reverse-domain-style package identifier, and the app's display name.

    $ ./path/to/cordova-ios/bin/create /path/to/my_new_project com.example.project_name ProjectName

Build a Project

    $ /path/to/my_new_project/cordova/build

Run App on an Emulator

    $ /path/to/my_new_project/cordova/run --emulator

Run App on a Device

    $ /path/to/my_new_project/cordova/run --device

Releasing

    $ /path/to/my_new_project/cordova/build --release

(modify the cordova/build-release.xcconfig file for your Code Signing identity)

Logging

    $ /path/to/my_new_project/cordova/log