Set up for signing BlackBerry 10 apps

If you want to test your application in the BlackBerry 10 OS without signing it, you can create and install a debug token. For more information about debug tokens, see Deploy to a BlackBerry 10 device.

Configure your computer to sign applications

The steps in this section apply to first-time configuration for signing and for requesting debug tokens.

If you are migrating to the BlackBerry 10 WebWorks SDK from a previous version of the BlackBerry WebWorks SDK, perform the steps outlined in the Migrating to the BlackBerry 10 WebWorks SDK section.

  1. Request permission to sign your BlackBerry 10 application by completing the web form at https://www.blackberry.com/SignedKeys.

    Remember the PIN number you provided.

  2. After your application is accepted, you will receive two .csj registration files by email. Each file arrives in a separate email message with information about the purpose of the file attached. Save these files to a location on your computer.
    • client-RDK-xxxxxx.csj - This is the file that you use to sign your applications and publish to the BlackBerry World storefront.
    • client-PBDT-xxxxx.csj - This file is used to generate a debug token that you can use to test your application on a device.

    These files are used to install code signing keys. They can only be used once.

  3. Register with the RIM Signing Authority using your .csj registration file for application signing. From the \dependencies\tools\bin folder located in the BlackBerry 10 WebWorks SDK installation folder, run the .bar signing tool to enroll with the signing authority server:
    blackberry-signer -register -csjpin <csj pin> 
        -storepass <KeystorePassword> <client-RDK-xxxxxx.csj file> 
        <client-PBDT-xxxxx.csj file>
    where
    • <csj pin> is the PIN you specified on the web form when you requested code signing keys
    • <KeystorePassword> is a password that you specify for the keystore
    • <client-RDK-xxxxxx.csj file> is the app signing .csj file sent by email after you registered
    • <client-PBDT-xxxxx.csj file> is the debug token .csj file sent by email after you registered

This command creates the following files: author.p12, barsigner.csk, and barsigner.db.

Example

When we filled out the code signing registration form, the PIN that we specified was 123456. We saved the CSJ files that we received via email in the C:\keys folder. We're using Windows 7, so we open a command prompt, and navigate to the C:\Program Files (x86)\Research In Motion\BlackBerry 10 WebWorks SDK <version>\dependencies\tools\bin folder. The keystore password is something new we have to create, so we chose the password rocket11. At the command prompt, here's the command that we type to register our signing keys:

blackberry-signer –register –csjpin 123456 –storepass rocket11 C:\keys\client-RDK-488888888.csj C:\keys\client-PBDT-488888888.csj

After running this command, the author.p12, barsigner.csk and barsigner.db files are created in the folder C:\Users\myname\AppData\Local\Research In Motion with a keystore password of rocket11. When we sign our applications, we'll use rocket11 as the keystore password.

Backing up your files

The CSJ files that you used to install your code signing keys can only be used once. They are disabled after a successful installation, which makes it important to back up your code signing keys after they have been installed. Code signing keys can be restored to the original computer that they were installed to or restored to another computer. You can also use this information to transfer your code signing keys to multiple computers and sign from any of them.

The files that need to be backed up are: author.p12, barsigner.csk and barsigner.db. The barsigner files are located in the directories outlined below. These are stored in a central location in the user's profile directory and used by all BlackBerry Tablet OS and BlackBerry 10 development tools. Their location will vary based on the operating system you use. To restore your code signing keys, copy the files back to the directory outlined below.
  • Windows XP: %HOMEPATH%\Local Settings\Application Data\Research In Motion
  • Windows Vista and Windows 7: %HOMEPATH%\AppData\Local\Research In Motion
  • Mac OS: ~/Library/Research In Motion
  • UNIX or Linux: ~/.rim

By default, %HOMEPATH% is C:\Documents and Settings\<User> on Windows XP and C:\Users on Windows Vista and Windows 7.

Migrating to the BlackBerry 10 WebWorks SDK

If you are migrating to the BlackBerry 10 WebWorks SDK from a previous version of the BlackBerry WebWorks SDK and you want to use the sigtool.p12 file created by a previous version, rename this file to author.p12 and move it from the BlackBerry WebWorks SDK bbwp\bin folder to the appropriate common location, depending on your environment. For example:

  • Windows XP: %HOMEPATH%\Local Settings\Application Data\Research In Motion
  • Windows Vista and Windows 7: %HOMEPATH%\AppData\Local\Research In Motion
  • Mac OS: ~/Library/Research In Motion
  • UNIX or Linux: ~/.rim

Last modified: 2013-05-02