Wednesday, May 4, 2011

Signing your Blackberry application


Signing your application

Before you can distribute your application for use on a BlackBerry® tablet, you must sign your application. The signing tool included with the BlackBerry® Tablet OS SDK adds cryptographic hash values to your application package (BAR file) during the signing process. The hash files help verify the authorship of your application to users and the BlackBerry Tablet OS.

If you want to test your application on a device without signing it, you can create and install a debug token on the device. For more information about debug tokens, see "Running unsigned applications using a debug token".
The following steps describe the application signing process. For more information about how to sign an application using a particular tool, follow the links to the tool-specific topics below. There are two phases in the signing process. In the first phase, you configure your computer to sign applications. You should only need to configure your computer once. To configure your computer:
  1. Request permission to sign BlackBerry Tablet OS applications by completing the web form athttps://www.blackberry.com/SignedKeys. After your application is accepted, you receive two CSJ registration files by email. One file allows you to configure your keystore to sign applications; the other file allows you to create debug tokens. Each file arrives in a separate email with information about the purpose of the file attached.
  2. Configure your computer to communicate with the RIM® Signing Authority
  3. Register with the RIM Signing Authority using your CSJ registration file for application signing.
  4. Create a Developer Certificate. Ensure that the common name (company name) parameter matches theauthor element in your blackberry-tablet.xml file. For more information about the blackberry-tablet.xml file, see Configuring your application.
In the second phase of the signing process, you sign your application. You must sign your application each time you want to publish it. To sign your application:
  1. Request a BAR file signature for your application from the RIM Signing Authority.
  2. Apply your signature to the BAR file using your Developer Certificate.
After you sign your application, you can publish it to BlackBerry App World™ storefront.

Assigning a version number to your application

You must change the version number of your application before you package it for signing and installation onBlackBerry® tablets. The version number for a BlackBerry® Tablet OS application comprises a series of four numbers separated by decimals (for example 1.0.5.357).
(Major).(Minor).(Revision).(Build)
Each time you sign your application, you must change at least one segment of the version number. You can change the major, minor, and revision numbers by updating the versionNumber element in the your_project_name-app.xmlfile.
You can change the build number by updating the buildId element in your blackberry-tablet.xml file. Alternatively, you can specify the build ID using the buildId command line option when you package your application using theblackberry-airpackager tool. The buildId option accepts a number from 0 to 65535. If you specify a build number in both the blackberry-tablet.xml and using the blackberry-airpackager tool, the value given to the blackberry-airpackager tool is used.

No comments:

Post a Comment