Build, test, and deploy your app

Before you build your BlackBerry app, you must check your project's dependencies and verify the output paths in your project's properties.

Resolve build issues

Every project is different and you might encounter some build issues that you must resolve. This section includes a couple of examples of solutions to help you get going. Getting started with porting can also help you get your existing app running quickly.

The first time you import a project, the Platform Toolset is set to v120. Before you can build your project, you must set it to qcc.

  1. Right-click the project and click Properties.
  2. In the Property Pages window, click Configuration Properties > General > Platform Toolset.
  3. Click the drop-down list and enter qcc.
  4. Click Apply.
  5. Click OK.

Depending on your project, you may need to add or edit the libraries that your project needs.

  • If you created a Managed project in the Momentics IDE for BlackBerry, the linker settings can be imported from the .cproject file when you import a BlackBerry 10 Native SDK project. Some libraries may need to be added manually.
  • If you created an Unmanaged project, the libraries that you need to add in the linker are found in the common.mk file. In this file, there is a line that starts with LIBS+= followed by a list of libraries. These libraries need to be added.

To add the libraries:

  1. Right-click the project and click Properties.
  2. In the Property Pages window, click Linker > General > Additional Library Directories.
  3. Click the drop-down list and enter the required libraries.
  4. Click Apply.
  5. Click OK.

If you do not have a common.mk file, you must determine what libraries your project needs and then add them.

Build your app

When you use the BlackBerry Native Plug-in for Microsoft Visual Studio, you can use a BlackBerry 10 device or the BlackBerry 10 Device Simulator as the target device.

You can create a debug configuration, which allows you to debug your app, or a release configuration, which prepares your app for signing. When you build your app, make sure that you build it using the solution platform (BlackBerry or BlackBerrySimulator) that corresponds to the target.

Create a debug configuration

When you build your app using the debug configuration, your code is compiled but not packaged into a .bar file.

When you run your app using the debug configuration, your code is compiled, packaged into a .bar file, and deployed to your chosen target device as configured in the BlackBerry > Settings menu.

To create a debug configuration:

  1. On the Build menu, click Configuration Manager.
  2. In the Configuration Manager window, in the Active solution configuration drop-down list, select Debug.
  3. In the Solution Explorer window, right-click the project.
  4. Click Build.
  5. On the Debug menu, click Start Debugging.

Create a release configuration

When you build your app using the release configuration, your code is compiled and packaged into a .bar file. This option does not deploy your app.

To create a release configuration:

  1. On the Build menu, click Configuration Manager.
  2. In the Configuration Manager window, in the Active solution configuration drop-down list, select Release.
  3. In the Solution Explorer window, right-click the project.
  4. Click Build.

Test your app

Before you can test your app on a simulator or device, you must set a target device.

You can use the integrated debugging functions of Microsoft Visual Studio to perform most of the basic debugging tasks you need.

  1. In Microsoft Visual Studio, create a debug configuration. See Build your app.
  2. Debug your app using the Microsoft Visual Studio debug tools. For more information, click Help > View Help.

Use the target navigator

The target navigator shows the command line and environment variables for processes that are running on the device. You can connect to a device or a simulator using Wi-Fi or a USB cable and view the processes, sandboxes, shared files, and developer and system files related to the device. In Microsoft Visual Studio, on the BlackBerry menu, click Target Navigator.

Screen showing the Target Navigator window.

Right-click the target you want to connect to. You can edit the details of the target and select to connect or disconnect.

Screen showing the Target Navigator window options.

When you are connected to the device, you can view and manage the processes running on the target.

Screen showing the Target Navigator files.

Check the logs

In the Logs window (which you can access by clicking BlackBerry > Options > BlackBerry > Logs), you can set a directory to store logging information. You can also control how logging works for your project.

Screen showing logging information.

Deploy your app on a target

Before you can deploy your app on a target:

  1. Set up your device.
  2. Build your app using one of the BlackBerry configurations.
  3. Set the IP address and password for the BlackBerry device or simulator.
  4. Connect a BlackBerry device to your computer or start the simulator.

To deploy your app:

  1. In the Solution Explorer window, right-click the project.
  2. Click Deploy.

If you see the Update Manager window open, see Choose a runtime library for information on runtimes and API levels.

Last modified: 2015-03-03



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

comments powered by Disqus