Set up your environment

Before you start developing for BlackBerry 10, there are a few things that you need to do.

Get code signing keys and debug tokens

You need an account to get code signing keys and distribute your applications. When you request an account, you receive a set of keys that allow you to sign your applications and generate debug tokens. Debug tokens are necessary for testing your application on a device. You don't need code signing keys or debug tokens to run apps on a simulator.

Request the account and keys ›

Download and install the SDK

You need to install the BlackBerry 10 Native SDK for your operating system. Windows, Mac OS, and Linux are supported.

Download the BlackBerry 10 Native SDK ›

Download and install the simulator

If you don't have a BlackBerry 10 device, you can use the BlackBerry 10 Device Simulator to test your applications.

Install and configure the simulator ›

Set up the SDK and connect to your device or simulator

Now you can set up the BlackBerry 10 Native SDK to connect to your device or simulator, and upload your debug tokens so that you can develop an application on a device. For more information about debug tokens, visit Signing and publishing. You'll be working in the QNX Momentics IDE, which is the development tool for all C/C++ applications and Cascades applications.

Let's get started!

For the BlackBerry 10 device, remember to set Development Mode to On in the security settings on the device before connecting to it in the QNX Momentics IDE.

On your device, navigate to Settings > Security and Privacy > Development Mode, and set the Use Development Mode option to On. You can find Settings by swiping down from the top bezel or by finding the Settings app on your home screen.

  1. In Windows and Mac OS, start the QNX Momentics IDE by using the BlackBerry 10 Native SDK shortcut created by the installer.

    In Linux, start the QNX Momentics IDE by running bbndk.sh in the Native SDK installation folder.

  2. If prompted, choose a workspace and click OK. A workspace is a folder where you keep your projects.

  3. Launch the BlackBerry Deployment Setup Wizard. The BlackBerry Deployment Setup Wizard launches automatically when you create a project for the first time. The wizard walks you through configuring your environment for creating applications and deploying them to your BlackBerry 10 device. You can also launch the wizard manually.

    1. In Windows and Linux, click Window > Preferences. In Mac OS, click Momentics > Preferences.

    2. Click BlackBerry and click BlackBerry Deployment Setup Wizard.

    3. Follow the on-screen instructions to set up your target (simulator or device) and, if you have a device, add your debug tokens to the device.

Now you are ready to build an application!

Build an application

  1. In the QNX Momentics IDE, on the File menu, click New > Example.

  2. Select BlackBerry Cascades C++ Project from SDK Samples and click Next.

  3. Choose a template and click Finish.

    The BlackBerry Deployment Setup Wizard launches automatically if you haven't already run it. Follow the on-screen instructions to set up your target (simulator or device) and, if you have a device, add your debug tokens to the device.

  4. A screenshot of the QNX Momentics IDE preview buttons.To preview the UI of your project, open the main.qml file for the project (located in the assets folder). At the top of the edit area, there are five buttons. Click the second button (Design Mode) to preview how your UI looks before you deploy it. The Vertical Split Mode and Horizontal Split Mode buttons let you preview the source code area side-by-side with the preview area.

  5. If you're using a device, in the Project Explorer view, double-click the bar-descriptor.xml file. On the General tab, click Set from Debug Token to set author information for the app.

    If you're using the simulator, set the correct build configuration. Right-click your project and click Build Configurations > Set Active > Simulator-Debug.

  6. In the Project Explorer view, right-click the project and select Build Project.

  7. Right-click the project again and select Run As > BlackBerry C/C++ Application.

Celebrate! You've just set up your environment. Feel free to take a look at some follow-up material.

Last modified: 2013-06-12