The BAR application descriptor file

The BAR application descriptor file (or the application descriptor file), named the bar-descriptor.xml file, specifies the parameters for identifying, installing, and launching native apps on BlackBerry 10 OS.

The application descriptor file is an XML file with a structure defined by the Document Type Definition (DTD) for the application descriptor file. The root element in the application descriptor file is <qnx>. You nest all other XML elements within the <qnx> element.

All app projects require an application descriptor file. You can use the application descriptor file to configure things such as the:
  • appearance and behavior of your application on the BlackBerry 10 OS
  • application name, author, and other descriptive information required for your application
  • debug token to run on BlackBerry 10 devices
  • assets to include in the package for the application, such as icons, libraries, and images
  • permissions required for the application, such as access to the internet, camera, or shared files

If you create a project for your app in the Momentics IDE, the application descriptor file is automatically created and packaged in the application's BAR file (.bar file) when you run a launch configuration. The IDE provides the Capabilities editor that lets you add and modify the information for the application using a tabbed user interface. Alternatively, you can edit the application descriptor file directly in the IDE or using another text-based editor.

If your preference is to work outside of the IDE, for instance using command-line tools and text-based editors, you must manually create the application descriptor file and ensure that it is named bar-descriptor.xml. When you are ready to package your application into a BAR file outside of the IDE, you specify the path of the application descriptor file as one of the parameters in the blackberry-nativepackager command-line tool.

Last modified: 2013-12-21

comments powered by Disqus