Build, test, and deploy your app

Before you build your BlackBerry app, you need to 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 need to 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 v110 or v120 depending on whether you installed Microsoft Visual Studio 2012 or 2013. Before you can build your project, you need to set it to qcc.

  1. Right-click the project and click Properties.
  2. In the Property Pages window, click Configurations Properties > General > Platform Toolset.
  3. Click the drop-down menu 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, 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 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 menu and enter the required libraries.
  4. Click Apply.
  5. Click OK.

If you do not have a common.mk file, you need to figure out 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 a 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, click 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, click 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 device target.

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

To test or debug your app:

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

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 Update your API level for information on runtimes and API levels.

Last modified: 2014-02-25



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

comments powered by Disqus