Signing apps

Before you can distribute your app for use on a BlackBerry 10 device, you must sign it. To sign an app, you must create a BlackBerry ID token, which is described below. You can sign your app using the Momentics IDE . Alternatively, you can sign your app using command-line utilities. When you sign an app, the signing process adds cryptographic hash values to your app package (.bar file). The hash files help to verify the authorship of your app to users and the BlackBerry 10 OS.

If you decide to do an app upgrade, it should be signed with a BlackBerry ID token that was created from the BlackBerry ID that was used to sign the original app. In addition, you should increment the version number before you upload your app to the BlackBerry World storefront.

If you want to test your app on a device without signing it, you must create and install a debug token on the device. For more information about debug tokens, see Set up your environment in the Getting Started guide.

The following steps describe the BlackBerry ID token creation and app signing processes. There are two phases in the signing process. In the first phase, you create a BlackBerry ID token. In the second, you configure your computer to sign apps, which you only need to do once.

To create a BlackBerry ID token:

  1. Log in to BlackBerry ID, or log in through the BlackBerry Development Setup Wizard in the Momentics IDE.

    If the BlackBerry Deployment setup wizrd doesn't run for you when you first install, select Window > Preferences in the IDE, then in the Preferences dialog window, click Blackberry > BlackBerry Deployment Setup Wizard.

    If you have already obtained your BlackBerry ID token, when you run the BlackBerry Development Setup Wizard, you can browse to where the .zip file that was downloaded during the Signing Registration section of the setup.

  2. Type and confirm the password you want to use for your BlackBerry ID token, and then click Get Token.

    If you forget this password, BlackBerry won't be able to retrieve or reset it for you. You will need to create a new BlackBerry ID token.

  3. Download and save the BlackBerry ID keystore file.

    If a barsigner.db or barsigner.csk file exists on your machine, you won't have the BlackBerry ID option through the IDE wizard. Through command-line tools, you can link a BlackBerry ID account to your current signing authority account. To learn how, see Link a BlackBerry ID account to a signing authority account.

To configure your computer to sign apps:

  1. Complete the BlackBerry Deployment Setup Wizard. This wizard runs when you create a new project for your app, and it guides you through the configuration process to sign your apps or test them on a device. If necessary, you can manually configure your environment for app signing.
  2. Sign your app by requesting a .bar file signature from the BlackBerry Signing Authority. After you sign your app, you can upload and publish it to the BlackBerry World.

    If you plan to upload your signed app to BlackBerry World, you must increment the version number of your app before you sign it and upload it. It is not necessary to increment the version if you do not plan to upload your app to BlackBerry World. To see how to assign version numbers to your app, see Assigning a version number.

Your BlackBerry ID token is valid for one year. When it expires, you need to create a new one.

Last modified: 2013-12-21

comments powered by Disqus