Creating your first app

This tutorial will guide you through creating a simple "Hello World" app, and help you verify that you successfully installed and configured the tools.

You will learn to:

  • Set up your project
  • View your app on a simulator
  • View your app on a device

Before you start, make sure you have the necessary tools installed. For more information, see Setting up your system.

Set up your project

To create your project:

  1. Open BlackBerry WebWorks <version>. A new browser window opens, displaying the BlackBerry 10 WebWorks SDK web tool.
  2. Click [+] beside the Recent Projects heading in the navigation panel.
  3. Enter Hello World in the Project Name field.
  4. Enter C:\TestApps in the Project Path field.
  5. Click Create.

The default app project includes all the necessary artifacts to function as a complete app.

View the app on a simulator

Verify the following on your BlackBerry 10 Device Simulator:
  • Device Password is enabled (Settings > Security and Privacy > Device Password)
  • Development Mode is enabled (Settings > Security and Privacy > Development Mode)

To build your app and deploy it to a simulator:

  1. In the BlackBerry 10 WebWorks SDK web tool, under your project's name in the navigation panel, click Build.
  2. Select Debug Mode.
  3. Select Simulator.
  4. Click Build & Install.

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

The SDK web tool also places an unsigned copy of the .bar file on your computer in the following location: <your_app_project_directory>\platforms\blackberry10\build\device.

View the app on a device

Before you begin:

Before you can view the app on your device, you must ensure that Development Mode is enabled (Settings > Security and Privacy > Development Mode).

  1. In the BlackBerry 10 WebWorks SDK web tool, under your project's name in the navigation panel, click Build.
  2. Select Debug Mode.
  3. Select Device.
  4. Enter your device password.
  5. Enter your keystore password, which you defined when you registered your BlackBerry ID token. If you have not yet registered your BlackBerry ID token, see Set up your computer for testing and signing.
  6. Click Build & Install.

When the tool finishes the build process, it attempts to install the app on the connected BlackBerry device. Once the app successfully installs on your device and before the app starts for the first time, a dialog box appears. Click OK on this dialog box to permit the app to access various resources on your device. A dialog box also appears when the app is opened to inform you that Web Inspector is enabled.

Before the tool installs the app, it checks to see if a debug token is already installed on the device. The debug token is a signed app that allows you to install and run unsigned apps on a BlackBerry 10 device so you can debug your apps. If there is no valid debug token installed, the tool creates and installs one for you using the keystore password you supplied when you set up your app for debugging and signing.

After the build process is finished, the SDK web tool also places an unsigned copy of the .bar file on your computer in the following location: <your_app_project_directory>\platforms\blackberry10\build\device.

Last modified: 2014-12-04



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus