Skip to content

Environment Setup

phofman edited this page Nov 13, 2014 · 5 revisions

After installation you might need to do some extra steps, that will configure your environment and let you compile, package, sign and debug applications on BlackBerry OS powered devices. Let's try to list them here.

The VSIX package (check: Installation) will create a BlackBerry main menu, next to the Tools inside Visual Studio. Click Options to be moved directly to dedicated UI, that will let you examine every detail of the plugin.

Top Menu

Plugin doesn't start automatically. You must open any project or click any command from that menu to make it happen. Otherwise all dynamic lists (of installed NativeCore SDKs, devices and simulators) could appear empty.

1. Examine the list of NativeCore SDKs and select an API Level

The 'API Levels' tab is designed to manage existing set of NativeCore SDK (known also as NDK and API-Level). At least one is required and must be selected in the combo-box as it delivers the proper toolchain to build application for target device or simulator.

API Levels

Although the plugin tries to search for already installed NDKs, you might want to install or add a new one. Click the Install button next to the proper version to execute those actions on the screen below.

Note that you can only uninstall NDKs downloaded using the plugin. All the other ones will have the action button disabled. The 'API Levels' tab screen displays full info about selected NDK, where you can verify paths, as well as supported devices and permissions.

New SDK

If you don't have 'bbndk_vs' installed and set on 'General' tab, the list of possible actions will be limited. You can only add existing NDK from desired location. You can also do it when 'bbndk_vs' folder exists, this option is simply on the far end list of available items.

New SDK without bbndk_vs

Defining Custom NDK is streamlined to pointing its path. Use any of the 'Browse...' buttons and the rest of the fields will be filled automatically. Usually you would like to tweak the name only as this is the only moment you can do it.

Custom SDK

When adding PlayBook NDK, please make sure the type is set to 'Tablet'.

2. Add target device

Next step is to add as many devices used for development as you like. You can define connections via wifi or USB by specifying the destination IP address. Simulators are also understood as devices connected via wifi, the only difference is that they are build against x86 architecture instead of ARMv7 as the phones devices. That's why simulators represent another connectivity category.

Each device must have Development Mode enabled make the connection (and the debug-token installed later with matching device's PIN to run debug version of application).

Target Devices

When several devices has been added, you can mark one phone and one simulator as active. This means each time you hit F5 or Ctrl+F5 to launch the application, they will be used as deployment targets. To change produced binaries architecture, please use project settings page, by clicking in Solution Explorer on a project, followed by 'Properties' menu entry.

New device dialog allows for testing the connectivity. In case of any problems they will be displayed instantly. If the connection succeeds, it will also suggest the name, based on read target device's properties.

New Target Device

At least one device must be defined to produce the BAR file. The BAR package is created ONLY, when deploying.

If you completed those two steps already, you would probably notice, that the info about active NDK and devices is hidden deeply inside the Visual Studio's plugin settings. Since this info is quite vital during development, there is an easier way of accessing it. Expand 'Targets' submenu of BlackBerry menu and it will show all the lists. Clicking them makes it immediately active now.

Targets Submenu

3. Create and upload debug-token

Final need to launch your custom not-signed application on a phone is the debug-token (simulators don't require anything like that as they are designed for development). Debug-token issued by BlackBerry informs the device, that specified software vendor (aka author) is trustful. Unfortunately they are valid only for the next 30-days and must be renewed.

List of device PINs and correctly setup Developer Certificate are required to request a debug-token. Later, when it is created, the author-id and author-name embedded inside the debug-token must be also put inside proper tags of application's bar-descriptor.xml file. Fortunately the plugin caches those values, each time new debug-token is issued and updates the bar-descriptor accordingly, when NEW project is created. For existing projects use the bar-descriptor visual editor, that will suggest those values.

Click the right-bottom button on 'Targets' tab to:

  • create
  • renew
  • remove
  • upload the debug-token onto selected devices.

You must have at least one device in development mode next to you.

Debug Token

Clone this wiki locally