Deploy your app to a simulator

You can deploy your app to a BlackBerry 10 Device Simulator using the SDK web tool or the command line.

Before you begin:
  • Make sure your BlackBerry 10 Device Simulator is running.
  • Turn on Development Mode on the simulator. Note that for security reasons, Development Mode expires after 10 days and whenever the simulator is rebooted. For more information, see Enable Development Mode on a device or simulator.

Deploy your project using the SDK web tool

To build your app in debug mode and deploy it to a simulator for testing:

  1. On the Start menu, click BlackBerry >BlackBerry WebWorks <version>. A new browser window opens, displaying the BlackBerry 10 WebWorks SDK web tool.
  2. Navigate to your project and click Build.
  3. Select Debug Mode.
  4. Select Simulator.
  5. Enter the device password used by your simulator.
  6. Click Build & Install.

The tool packages your app into a .bar file, installs it on your simulator, and opens it.

Deploy your project from the command line

You can build and deploy your app to a BlackBerry 10 simulator using the emulate command.

The emulate command first packages your app resources into a .bar file, deploys the .bar file onto the simulator, and automatically launches the app. If a .bar file with the same name already exists on the simulator, the emulate command first uninstalls the existing .bar file before deploying the new .bar file. If you choose, you can skip the build or launch steps of the process.

To build your app and launch it to a simulator:

  1. On the command line, navigate to your project folder.
  2. Run the following command:
    webworks emulate [--devicepass <password>] 
              [--target <target_id> [--no-build] [--no-launch]

    If successful, the emulate command launches the app on the simulator. It also places a copy of the unsigned .bar file in the following location: <your_app_project_directory>\platforms\blackberry10\build\simulator.

For example, the following sample will deploy the app on the target simulator with the ID of "myZ10sim". If the app has already been deployed to myZ10sim, it uninstalls the previous version before installing the new version.
webworks emulate --target myZ10sim

All parameters are optional. Check the table below for parameter details:

Parameters Description
--devicepass <password>

The simulator password. If you omit this parameter, you will be prompted to supply the simulator password, if necessary.

--target <target_id>

The target ID of a pre-defined target simulator. In most cases, this parameter is unnecessary.

--no-build

Causes the command to skip the build step. The command deploys the most recently built version of the application.

--no-launch

Causes the command to skip the launch step. The command deploys the app on the simulator, but does not actually launch the app.

Last modified: 2014-03-14

comments powered by Disqus