Configure your development environment

After you install the BlackBerry Native Plug-in for Microsoft Visual Studio and open Microsoft Visual Studio, the BlackBerry tab is displayed. There are a few things that you should do to configure your development environment, and the BlackBerry tab is where you start.

Register with BlackBerry

To sign and publish your completed app, you must register with BlackBerry by creating a BlackBerry ID token and a developer certificate.

In the BlackBerry Signing Authority window, you can register, unregister, and edit the publisher information.

  • Register: You must register before you can sign your app.
  • Unregister: If you unregister, you must request a new BlackBerry ID token before you can sign your app.
  • Edit Publisher info: You can change the name that you register your app with. The next time you build your app, the new name appears.
Screen showing the BlackBerry Signing Authority window.

You can register more than one device, but only one can be active at a time.

To register, complete the following steps:

  1. In Microsoft Visual Studio, on the BlackBerry menu, click Options > BlackBerry > Signing and click Register.
  2. In the Developer Registration window, complete the Author Name field. The author name appears on your app.
  3. In the Password field, type the password that you will use for your BlackBerry ID token and confirm the password.
  4. Click Create Token. The Request BlackBerry ID token window opens, and you can log in or create an account.
  5. In the Username and Password fields, type your username and password for your BlackBerry ID.
  6. Click Sign In.

If successful, the Developer Registration window displays a message that a BlackBerry ID token is created.

Screen showing the Developer Registration window.

Certificates

Your app must be signed by a developer certificate, which is created independently of the BlackBerry ID token. Signing your app adds cryptographic hash values to your application package, which helps to verify the integrity and authenticity of your app to other users and to the device.

To create a certificate, click Create Certificate.

To import an existing certificate, click Import Certificate.

When registration is complete, a message is displayed in the Developer Registration window.

Screen showing the Developer Registration window after successful registration.

If registration is successful, a message similar to the following is displayed in the BlackBerry Signing Authority window.

Screen showing the registered status.

You can get the details about your certificate by clicking the Details button in the BlackBerry Signing Authority window.

You can reload the author information that's contained in the developer certificate by clicking Load. You are prompted to enter the password that you used when you created the BlackBerry ID token.

Back up and restore

You can back up and restore your BlackBerry ID token.

On the BlackBerry menu, click Options > BlackBerry > Backup. Here you can:
  • Click Backup to create a backup of your BlackBerry ID token or if you want to move your BlackBerry ID token from one computer to another. A profile_backup.zip file is created.
  • Click Restore if you moved your BlackBerry ID token from one computer to another and you want to restore the token on your new computer.
Screen showing the Backup and Restore buttons.

Choose an API level

The API level determines which APIs are available for you to use in your app. The API level corresponds to a version of the BlackBerry 10 OS (for example, 10.0, 10.1, 10.2, and 10.3). When you select an API level for your project, you are choosing the version of the BlackBerry 10 OS that your app is compatible with.

The API level is backward compatible. Later API levels include all of the APIs from lower API levels. For example, API level 10.3 includes all of the APIs from 10.2, 10.1, and 10.0. APIs are deprecated but are not removed, to ensure that existing apps can continue to use them.

The API level of your app must correspond to the API level of the device that you want to run your app on. Apps that are developed with a lower API level are supported on existing devices and can reach a broader market. However, apps that are developed with a later API level can take advantage of a richer set of APIs and features.

If your app uses APIs that were introduced in a later API level, you won't be able to install the app on a device with a lower API level. However, you can run an app with a lower API level on a device with a later API level because API levels are backward compatible.

To choose an API level:

  1. On the BlackBerry menu, click Options > BlackBerry > API Levels. In the Current API Level drop-down list, the current API level is displayed.

    Screen showing the API Level window.

  2. In the Current API Level drop-down list, select the API level that you want your app to use.

You can also go to BlackBerry > Targets and choose the API level you want.

Install a new API level

If there is no API level listed in the Current API Level drop-down list, or if you want to install a different API level, you can install a new API level.

  1. In the API Levels window, click Install to see the available API level options.
  2. In the Installation window, click the Native SDK tab.
  3. In the Available section, choose the API level that you want and click Install.
  4. In the Confirmation dialog box, choose the version that you want and click Install.
  5. In the Microsoft Visual Studio window, click OK.
  6. Click OK.
Screen showing the installed and available APIs.

Add a custom NDK

You can add a custom version of the BlackBerry 10 Native SDK to use to build your apps.

  1. In the API Levels window, click Install to see the available API level options.
  2. In the Installation window, in the Available section, beside Add Custom NDK, click Add.
  3. In the New Custom NDK dialog box, fill in the required details and click OK.
Screen showing the New Custom NDK dialog box.

Uninstall an API level or custom NDK

You can uninstall an API level or custom NDK.

  1. In the API Levels window, click Install.
  2. In the Installation window, in the Installed section, click Uninstall.

You can monitor the status of your installation or uninstallation by clicking Status in the API Levels window.

Choose a simulator

You can use the BlackBerry 10 Device Simulator to test your app. You don't need a debug token or BlackBerry ID token to run apps on the BlackBerry 10 Device Simulator.

If you are testing using the BlackBerry 10 Device Simulator, you should download a simulator that matches your SDK. For more information about the simulator, see Using the simulator.

Before you download the simulator, you must install VMware Player. Download and install VMware Player 3.1 or later.

  1. In the API Levels window, click Install.
  2. In the Installation window, click the Simulator tab.

    Screen showing the simulator installation window.

  3. In the Available section, choose the simulator that you want and click Install.

    The simulator is installed in the bbndk_vs folder.

  4. In the Confirmation dialog box, choose the version that you want and click Install.

    Screen showing the simulator confirmation window.

  5. In the Microsoft Visual Studio window, click OK.
  6. Click OK.

To uninstall a simulator:

  1. In the API Levels window, click Install.
  2. In the Installation window, click the Simulator tab.
  3. In the Installed section, click Uninstall.

You can monitor the status of your installation or uninstallation by clicking Status in the API Levels window.

Choose a runtime library

The device runtime includes the files that you need to perform debugging or profiling on a particular device. There is one device runtime for every released device build (such as 10.3.1.1154, 10.3.0.1172, and so on). It is installed on your computer when you try to start an app on a device. The device runtime corresponds to the API level, but it does not include information that is in the API level, such as header files. When there is a new device runtime, there is also a new API level. However, unlike the API level, you don't select the device runtime for a project.

When you deploy your app, the Update Manager automatically detects whether you have the correct API level and runtimes installed for your device. If there is a mismatch, the API Levels dialog box opens and you are prompted to install or update the runtime libraries or API level to deploy your app. If you do not install the runtime or API level, your app will not deploy.

If you already have more than one runtime library installed, you can choose which runtime library you want to use by clicking BlackBerry > Targets and choosing the runtime library that you want.

Install a runtime library

  1. In the API Levels window, click Install.
  2. In the Installation window, click the Runtime Library tab.

    Screen showing the Runtime Library window.

  3. In the Available section, choose the runtime library that you want and click Install.
  4. In the Confirmation window, choose the version that you want and click Install.

    Screen showing the runtime confirmation window.

  5. In the Microsoft Visual Studio window, click OK.
  6. Click OK.

To uninstall a Runtime Library:

  1. In the API Levels window, click Install.
  2. In the Installation window, click the Runtime Library tab.
  3. In the Installed section, click Uninstall.

You can monitor the status of your installation or uninstallation by clicking Status in the API Levels window.

Set a target device

When you set a target device, you must choose which version of the BlackBerry 10 Native SDK you are going to use. Then, you must set either a BlackBerry target device or a BlackBerry 10 Device Simulator target. This target is used when you build your project or solution.

Add a target device

  1. On the BlackBerry menu, click Options > BlackBerry > Targets.
  2. Click Add.
  3. In the Add New Target Device window, in the Type drop-down list, select the type of device.
  4. Fill in the Name, IP, and Password fields for the device.

    You can find the IP address by navigating to Settings > Security and Privacy > Development Mode on the device.

    The simulator IP address is found in the lower-left corner of the VMware Player window. Do not use the IP address that is provided on the Development Mode screen in the simulator.

  5. Click OK.

    Screen showing the add target device window.

You can test the connection of your device by clicking Test.

Edit a target device

  1. In the Targets window, in the Known Targets section, click the target that you want to edit.
  2. Click Edit.
  3. In the Edit Target Device window, edit the type, name, IP address, and password of your target device.
Screen showing the edit target device window.

Remove a target device

  1. In the Targets window, in the Known Targets section, click the target that you want to remove.
  2. Click Remove.
  3. Click Yes.

Set a target device as active

The Set Active button acts as a toggle. When a target is active, the letter "x" appears in the A column.

  1. In the Targets window, in the Known Targets section, click the target that you want to set as active.
  2. Click Set Active.

You can also change which target is active by clicking BlackBerry > Targets and choosing the target that you want.

Upload a debug token

A debug token allows you to deploy unsigned apps on a device. If you are using a simulator, you don't need a debug token. Debug tokens are valid for 30 days. When a debug token expires, the device no longer allows unsigned apps that rely on that token to run. When a debug token expires, you can generate a new one from the BlackBerry ID token that's registered on your computer.

If you previously used code signing keys to register another BlackBerry 10 device on your computer, your code signing keys will remain on your computer and continue to function. You should link them to your BlackBerry ID. For more information, see Link a BlackBerry ID account to an older set of signing keys.

Your BlackBerry ID token is valid for one year. When it expires, you must create a new one. Visit Code Signing Support for help with your BlackBerry ID token.

Before you upload a debug token, make sure that you request a vendor account and set a target device.

  1. On the BlackBerry menu, click Options > BlackBerry > Targets.
  2. Click Upload debug token.
  3. In the Debug Token Deployment dialog box, click Open and choose the debug token that you created when you registered with BlackBerry.
  4. Click Open.
  5. In the Onto Device section, select the target from the drop-down list. You can add a new target by clicking +.
  6. Click Upload.

Create a new debug token

  1. In the Targets window, click Upload debug token.
  2. Click Create.
  3. Choose the debugtoken.bar file that you want and click Save.
  4. In the PIN Editor window, do one of the following:
    • If your PIN is not in the list, in the PIN field, type your PIN and click Add.
    • If you don't know the PIN for your device:
      1. In the PIN Editor window, click Discover.
      2. In the Discover Device PIN window, complete the IP and Password fields for your device.
      3. Click Discover.
      4. Click OK.
  5. In the PIN list, select your PIN and click OK.
  6. Click Upload and then Close to upload your new debug token.

After you finish configuring your environment, you're ready to get started on your app!

Last modified: 2015-03-02



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

comments powered by Disqus