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.
- 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:
- Open BlackBerry WebWorks <version>. A new browser window opens, displaying the BlackBerry 10 WebWorks SDK web tool.
- Navigate to your project and click Build.
- Select Debug Mode.
- From the Install Target drop down list, select a target that represents a simulator.
- Enter the device password used by your simulator.
- 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:
- On the command line, navigate to your project folder.
- Run the following
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.
webworks emulate --target myZ10sim
All parameters are optional. Check the table below for parameter details:
The simulator password. If you omit this parameter, you will be prompted to supply the simulator password, if necessary.
The target ID of a pre-defined target simulator. In most cases, this parameter is unnecessary.
Causes the command to skip the build step. The command deploys the most recently built version of the application.
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-05-14