Porting from Cordova
BlackBerry WebWorks SDK 2.0 is built upon the Cordova open source project with custom BlackBerry plugins and features. This shift increases the portability of BlackBerry WebWorks applications and makes it easy to integrate with the BlackBerry 10 OS. Essentially, BlackBerry WebWorks SDK 2.0 consists of Cordova and BlackBerry specific APIs as well as a custom CLI and GUI.
Use the WebWorks CLI
The BlackBerry WebWorks CLI provides custom commands for developing and testing BlackBerry applications.
To use a BlackBerry WebWorks command, run webworks <command>, where <command> is one of the following:
- The build command builds your app in release mode or debug mode, without deploying it to a simulator or device.
- The serve command lets your preview your app in your default browser.
- The emulate command builds and deploys your app to a BlackBerry 10 Device Simulator.
- The run command builds and deploys your app to a BlackBerry 10 device. This command also create and install a debug token automatically.
Both the emulate and run commands also let you specify whether you want to skip the build or launch steps.
Add BlackBerry plugins
BlackBerry 10 WebWorks SDK 2.0 contains BlackBerry specific APIs that allow applications to tightly integrate with the BlackBerry 10 OS. You will need to use BlackBerry plugins to access core BlackBerry funtionality. For a full list of BlackBerry plugins, see Plugins installed with BlackBerry 10 WebWorks SDK.
To add a BlackBerry plugin using the BlackBerry WebWorks CLI:
- On the command line, navigate to your project folder.
- Run the following
webworks plugin add <id> | <path> | <uri>
webworks plugin add com.blackberry.app
Check the table below for parameter details:
Specifies the unique identifier for the plugin.
Specifies the path to the plugin on your local file system.
Specifies the remote location for the plugin.
Add BlackBerry plugins using the Cordova CLI
You can add BlackBerry plugins to your app without installing the BlackBerry WebWorks SDK by using the Cordova CLI.
Visit http://plugins.cordova.io/ to download the plugins and learn how to add them using the Cordova command line interface.
Last modified: 2014-03-10