license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Cordova for BlackBerry makes use of the BlackBerry WebWorks framework. BlackBerry WebWorks tooling is available for Windows or Mac environments.
WebWorks applications can ONLY be deployed to the following BlackBerry platforms:
Download and install the appropriate WebWorks SDKs for your development. BlackBerry 10, BlackBerry PlayBook, and BlackBerry Smartphone WebWorks SDKs can all be downloaded from the following locations. Please note that BlackBerry PlayBook development requires the Adobe Air SDK as well.
If you wish to publish your application on BlackBerry App World, or deploy on an actual device you’ll need to register for a set of free Code Signing Keys.
To register for Signing Keys visit, and complete the BlackBerry Keys Order Form.
Once you receive your Signing Keys, they'll need to be setup. To learn how to setup your Signing Keys visit the BlackBerry HTML5/WebWorks website.
Download the latest copy of Cordova and extract its contents to your local machine.
example
folder contains a complete Cordova project. Copy the example
folder to another location on your computer.BlackBerry 10 (QNX)
qnx.bbwp.dir=C:\\Program Files (x86)\\Research In Motion\\BlackBerry 10 WebWorks SDK 1.0.2.9
BlackBerry PlayBook
playbook.bbwp.dir=C:\\Program Files\\Research In Motion\\BlackBerry WebWorks SDK for TabletOS 2.1.0.6\\bbwp
BlackBerry Smartphone (OS5-7)
blackberry.bbwp.dir=C:\\Program Files\\Research In Motion\\BlackBerry WebWorks Packager
Build the Cordova sample project by typing ./cordova/build <target>
in your command prompt/terminal while you are in your project's directory. Replace <target>
with either qnx
playbook
or blackberry
. For example...
BlackBerry 10 (QNX)
./cordova/build qnx
BlackBerry PlayBook
./cordova/build playbook
BlackBerry Smartphone (OS5-7)
./cordova/build blackberry
BlackBerry smartphone simulators are only available on Windows. BlackBerry 10, and PlayBook simulators require VMWare Player (Windows) or VMWare Fusion (Mac OS X). The WebWorks SDK provides a default simulator. Additional simulators are available.
For instructions on installing simulators, please visit the following link(s):
Open the project.properties file with your favorite editor and customize the following properties.
BlackBerry 10
qnx.sim.ip
qnx.sim.password
Playbook
playbook.sim.ip
:playbook.sim.password
Smartphone (Optional)
blackberry.sim.dir
blackberry.sim.bin
C:\\Program Files\\BlackBerry\\Simulator
.While in your project directory, in command prompt/terminal type ./cordova/run <target>
. Replace <target>
with either qnx
, playbook
, or blackberry
. Note, for BlackBerry 10 and PlayBook, the simulator virtual image must already be started. For example...
BlackBerry 10 (QNX)
./cordova/run qnx
BlackBerry PlayBook
./cordova/run playbook
BlackBerry Smartphone (OS5-7)
./cordova/run blackberry
Answer ‘n’ when prompted “Do you have a BlackBerry device connected to your computer? (y/n)”
The application will be installed to the home screen of the simulator. Note, on BlackBerry OS 5 the application is installed in the Downloads folder.
To deploy your app to a device you must have registered for, and setup BlackBerry Code Signing Keys. See section 3 for details. Also, to deploy apps on BlackBerry 10 or PlayBook, the device must be set to Development Mode which can be enabled from the Settings > Security menu.
BlackBerry 10 (QNX)
qnx.sigtool.password
qnx.device.ip
qnx.device.password
BlackBerry PlayBook
playbook.sigtool.csk.password
playbook.sigtool.p12.password
playbook.device.ip
playbook.device.password
BlackBerry Smartphone (OS5-7)
blackberry.sigtool.password
While in your project directory, in command prompt/terminal type ./cordova/run <target>
. Replace <target>
with either qnx
, playbook
, or blackberry
. For example...
BlackBerry 10 (QNX)
./cordova/run qnx
BlackBerry PlayBook
./cordova/run playbook
BlackBerry Smartphone (OS5-7)
./cordova/run blackberry
Answer “y” when prompted “Do you have a BlackBerry device connected to your computer? (y/n)”
The application will be installed to the home screen of the device. Note, on BlackBerry OS 5 the application is installed in the Downloads folder.
The following articles provide help to issues you may encounter when developing a Cordova application which is based on the BlackBerry WebWorks framework