Articles and samples about testing and deploying BlackBerry 10 applications.


    • Link a BlackBerry ID token to a signing authority account

      Published Feb 09 2018, 2:19 PM by msohm

      Note: This information applies only to developers who have an existing app in BlackBerry® World™ that was submitted using BlackBerry code signing keys. If you used this method, you would have created a barsigner.csk token by installing a CSJ file.


      You can use the command-line tools to link a signing authority account to your BlackBerry ID token. Linking a signing authority to your BlackBerry ID token allows you to produce new .bar files with the same Package-Author-Id and  Package-Id  as older versions of the corresponding .bar files. Keeping the original values for these attributes allows you to create updates, or upgraded versions of your existing app on BlackBerry World.


      The blackberry-signer command lets you link your BlackBerry ID (bbidtoken.csk file) token to a signing authority account (barsigner.csk file).  The arguments you use depend on whether the passwords are the same, and whether the bbidtoken.csk file is in a custom location or the default location. Here are some examples:


      blackberry-signer -linkcsk –cskpass 


      • Option 2: Where bbidtoken.csk is in a custom location, and both passwords are the same: 
      blackberry-signer -linkcsk –bbidtoken  –cskpass 


      blackberry-signer -linkcsk –oldcskpass  –bbidcskpass 




    • Error: BBID Token has expired

      Published Feb 09 2018, 2:19 PM by msohm



      You received the error of "Error: BBID Token has expired" when signing your application or creating a debug token.




      Your BlackBerry ID Token used to sign applications and create debug tokens has expired.  BlackBerry ID Tokens expire after 1 year.




      Using the same BlackBerry ID account, create a new BlackBerry ID Token.  It is important that the same BlackBerry ID account is used to prevent the package ID of your application from changing, otherwise you will encounter errors when upgrading.

    • Signing or Creating a Debug Token Silently Fails

      Published Feb 09 2018, 2:19 PM by msohm



      Signing a BlackBerry® 10 application or creating a debug token silently fails on a computer using a non-English locale.  You may receive "Error: Null" or it may state that the command was successful.




      The barsigner Java® application has a localization issue for some locales.




      Upgrade to BlackBerry Native SDK version 10.3 or higher.




      Locate the blackberry-signer script (blackberry-signer.bat on Windows® and blackberry-signer on Mac and Linux®) and blackberry-debugtokenrequest script (blackberry-debugtokenrequest.bat on Windows and blackberry-debugtokenrequest on Mac and Linux), which will be located in a sub directory of your BlackBerry SDK installation directory.  Open these two files in a text editor and change line:


      java -Djava.awt.headless=true -Xmx512M …

      To this:


      java -Duser.language=en -Djava.awt.headless=true -Xmx512M …


    • BlackBerry 10 Code Signing Guide for Contractors with Multiple Clients

      Published Feb 09 2018, 2:20 PM by msohm

      Contractors creating applications for multiple clients will need to make use of multiple developer certificates and BlackBerry® Code Signing Keys or BlackBerry ID Tokens.  It is important to note that upgrades to an application must be signed with the same BlackBerry Signing Account as the previous version, otherwise the application upgrade would be installed as a separate application


      This document outlines the recommended procedure for managing this situation, which protects both the contractor and client company who owns the application.  This guide is divided into two sections, BlackBerry ID Tokens and BlackBerry Code Signing Keys.  If you are developing using a BlackBerry 10.2 or higher SDK, it is recommended to use BlackBerry ID Tokens.  If you are developing for the BlackBerry® PlayBook™ or using an SDK lower than version 10.2 you need to use a BlackBerry Code Signing Key.  Note that if both are present on your system, the BlackBerry ID Token will be used for version 10.2+ SDKs and the BlackBerry Code Signing key will be used by older SDKs.


      This document assumes you are starting from a clean computer that does not have any existing BlackBerry ID Tokens or BlackBerry Code Signing keys installed.  If you do, follow the instructions in the article Backup and Restore BlackBerry Code Signing Keys to back up your existing files and then erase those files from your computer to prepare to configure new ones.


      Using BlackBerry ID Tokens


      If you are developing using a BlackBerry 10.2 or higher SDK it is recommended to use BlackBerry ID tokens.  Step one would be to have your client log into their BlackBerry ID account and download a BlackBerry ID Token.  This puts them in control, enabling them to supply future contractors with a token that can be used to sign upgrades of their application.  You shouldn’t be held liable for a lost or missing BlackBerry ID Token.  Once they have their token they can email it to you along with the password they chose when downloading the token.  You’ll need to save the token in the directory listed below:


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


      After receiving the BlackBerry ID token you’ll need to create a developer certificate with your client’s name. 


      Creating a Developer Certificate using a BlackBerry IDE


      To create a developer certificate using a BlackBerry IDE, click on the Window menu, choose Preferences, expand BlackBerry, select Signing and click on the Create Certificate button.  When creating the developer certificate use the same password as the BlackBerry ID Token.

      This should create an author.p12 file in the same location you saved the BlackBerry ID token.


      Creating a Developer Certificate using the command line


      To create a developer certificate using the command line, execute the command below.  Use the same password as the BlackBerry ID token.


      blackberry-keytool -genkeypair -storepass  -dname "cn="



      Replace with the password you wish to use.  It is recommended to use the same password as the BlackBerry ID token.  Replace with your client’s company name.

      This should create an author.p12 file in the same location you saved the BlackBerry ID token.


      Using BlackBerry Code Signing Keys


      If you are developing using a BlackBerry 10.2 or higher SDK it is recommended to use BlackBerry ID tokens.  If you are developing using an older version of BlackBerry SDK you will need to use BlackBerry Code Signing Keys. 


      Is your client’s First BlackBerry Application?


      If this is your client’s first BlackBerry application they need to start fresh.  The first step is to either have your client request or request on their behalf a BlackBerry Code Signing key using their company name.  Once received, install the code signing keys.  Refer to the Code Signing help pages for instructions for installing keys for your SDK.


      After they have been configured, back up the code signing keys and send a copy of them to your client.  They can be backed up using the procedure outlined in this article:  Backup and Restore BlackBerry Code Signing Keys.


      Your Client has existing BlackBerry Applications


      If your client has existing BlackBerry 10 or BlackBerry PlayBook applications they would already have a BlackBerry Code Signing key.  Have them send you a backup of their key which you can restore.

    • Linking Code Signing Keys to BlackBerry ID Fails

      Published Feb 09 2018, 2:19 PM by msohm

      There are two known issues that you could encounter when linking BlackBerry® Code Signing Keys to a BlackBerry ID account.  The problems, causes and workarounds are listed below.



      Problem 1


      When linking existing BlackBerry Code Signing Keys to a BlackBerry ID account, the command silently fails.


      Cause 1


      A key for signing applications and key for creating debug tokens from 2 different code signing key orders are installed.  This occurs if you installed a CSJ file from two different orders.


      Workaround 1




      Solution 1


      This issue will be addressed in a future BlackBerry SDK release.





      Problem 2


      When linking existing BlackBerry Code Signing Keys to a BlackBerry ID account, the command fails with the following error.


      Error: Key PBDT is not registered


       Cause 2


      Only 1 of the 2 CSJ files from your code signing key order have been installed.  


      Workaround 2


      Install the PBDT CSJ file required to create debug tokens.


      Solution 2


      This issue will be addressed in a future BlackBerry SDK release.


    • Installers Show Blank Screen on Mac

      Published Feb 09 2018, 2:19 PM by msohm



      When installing a BlackBerry® Simulator or BlackBerry SDK on a Mac, the installer starts but shows a blank screen similar to the screenshot below.







      Update to the latest version Java® update from Apple per their email, quoted here:



      As of 10:00AM PST today, Apple has revised the "Java for OS X 2013-004" and "Java for Mac OS X 10.6 Update 16" updates to fix a widely reported issue with the original updates that shipped to customers on Tuesday.
      The crux of the problem involved dispatching events through sun.awt.AppContexts which were setup incorrectly when the JVM first initialized the AWT. Some impacted applications could work around the problem by changing the order of initialization of these classes, but we believe that we have provided a comprehensive fix with these revised updates.

      If you have previously installed the xM4508 versions of these updates you can upgrade to the fixed xM4509 version by manually installing:

      <> (10.7, 10.8+)
      <> (10.6-only)

      You can check if you have installed the xM4508 versions by running:
      /usr/libexec/java_home -v 1.6 -exec java -version


      If you have not installed "Java for OS X 2013-004" or "Java for Mac OS X 10.6 Update 16" already, you should receive this fix automatically through Software Update / App Store.


      If you have installed the previous Developer Package, we have posted fixed versions at:


      We apologize for the inconvenience this has caused, and would like to thank all of the developers who have brought this issue to our attention.






      Click on the application menu and click on Services to trigger the installer window to redraw.  You may need to repeat this step throughout the installation process.

    • Application Deployment may hang or fail after OTA Update to 10.1.

      Published Feb 09 2018, 2:19 PM by anzor_b


      After an OTA upgrade to 10.1, developers may find that they are no longer able to deploy applications onto the device using the SDK.


      The console may look like this:

      Deployment Failed: Info: Sending request: Install and Launch
      Info: Action: Install and Launch
      Info: File size: 205384
      Info: Installing com.example.AAAA.testDev_xample_AAAA306be591...
      Info: Processing 205384 bytes

      At this point the deployment may hang and fail with a timeout.



      This issue is resolved in BlackBerry 10.2.



      In order to deploy applications onto a device affected by this issue, you may use the blackberry-deploy -uninstallApp command with a package name that does not exist. Running this command every X seconds in the background while deploying an application should allow for successful deployment.


      To automate this, you can use the attached batch/bash script. This script runs an uninstall command on a package name that does not exist every 50 seconds, to keep the installer alive. This should allow the application to deploy. Once the application is deployed, you may close (CTRL+C) the script.




      1. Extract archive that applies to your OS

      2. Open the script using Notepad

      3. Edit the SDKBINPATH variable to point to the bin folder of the SDK, depending on your environment:


      BlackBerry® 10 WebWorks™ SDK:


      Example: C:\Program Files (x86)\Research In Motion\BlackBerry 10 WebWorks SDK\dependencies\tools\bin


      BlackBerry® 10 Native SDK:


      Example: C:\bbndk\host_10_1_0_212\win32\x86\usr\bin


      BlackBerry® 10 SDK for Adobe® AIR®:


      Example: C:\Program Files (x86)\Research In Motion\blackberry-tablet-sdk-3.1.3\bin


      Note: please ensure SDKBINPATH does not have a trailing slash.


      4. Edit IP if device IP is different from

      5. Run batch script > enter password

      6. Leave running in the background while you deploy your application

      7. Hit CTRL+C once the application is deployed


      If you are having issues locating blackberry-deploy in the above paths, you can perform a search and locate them manually.

    • Error: "Usage error, &#251;genkeypair is not a legal command" when creating Developer Certificate

      Published Feb 09 2018, 2:20 PM by msohm



      You receive the following error when creating your BlackBerry® Developer Certificate (.p12 file):


      Usage error, ûgenkeypair is not a legal command





      This happens when an “En Dash” character (Unicode U+2013) is used instead of the “Hyphen-Minus” (Unicode U+002D) in the command line when creating a BlackBerry Developer Certificate.  The “Hyphen-Minus” is normally the character that appears when you press the “minus” key on your keyboard.  However, some email clients and browsers can convert this character to “En Dash”.





      Type out the command in the command prompt window instead of copying and pasting from a browser or email client.

    • Upgrading an Application Using Different Languages

      Published Feb 09 2018, 2:20 PM by msohm


      This article applies to the following:

      • BlackBerry® 10


      BlackBerry 10 now supports upgrading an application written in one language to another.  For example you can upgrade an Android™ application to a Cascades™ application, an Adobe® AIR® application to a BlackBerry® WebWorks™ application or any other combination.  In order to do this, you'll need to sign both applications using the same BlackBerry Code Signing Key and specify the same package name.  Below is a summary of where the package name is specified for each BlackBerry SDK.


      If the package name or code signing key is different, your application upgrade could be rejected by BlackBerry®  World™.





      Cascades application using the BlackBerry Native SDK


      For Cascades applications, the package name is set in the bar-descriptor.xml file.  You can modify it by opening this file in the BlackBerry Native SDK, selecting the General tab and modifying the value next to Package Name as shown in the screenshot below, which uses a package name of com.example.bb10upgradetestapp.







      WebWorks Applications


      The package name for WebWorks applications is set in the id attributed of the widget tag of the application's config.xml file.  The code sample below shows the use of a package name of com.example.bb10upgradetestapp.

              version="" id="com.example.bb10upgradetestapp" xml:lang="en">




      Adobe AIR Applications using the BlackBerry SDK for Adobe AIR


      Adobe AIR applications set the package name in the appname-app.xml file under the id tag.  The following code sample also uses a package name of com.example.bb10upgradetestapp.






      Android applications using the BlackBerry Plug-in for ADT


      The package set for an Android application is used as the package name when building the application for BlackBerry.  It is set in the Package field on the Manifest tab shown when editing the AndroidManifest.xml file for your project as shown here.  The screenshot also uses com.example.bb10upgradetestapp.






      AIR Application exported as an Android Application using Adobe AIR Captive Runtime


      By default, when you export an AIR application from Adobe® Flash Builder® that uses the AIR Captive Runtime, "air." is prefixed to the application's package name.  This does not occur when you export BlackBerry applications.  This means if your BlackBerry application specified a package name of com.mypackage.myapp, the exported BAR file would use com.mypackage.myapp as the package name, but the exported APK would use  This configuration will break upgrades for users of existing applications if you were to repackage that APK file as a BAR file and submit to BlackBerry World.  Please refer to this article for instructions on removing the "air." prefix.  Retaining the Original Package Name for Upgrades to AIR Applications using AIR Captive Runtime

    • Slow Simulator Deployments on Computers without a Network Connection

      Published Feb 09 2018, 2:19 PM by msohm



      Deploying to the BlackBerry® 10 Simulator takes many minutes to complete on computers without an active network connection that are running Windows®.




      Windows can attempt to route the network connection initiated from a BlackBerry SDK to the VMWare® session running the BlackBerry 10 Simulator through the disconnected network adaptor(s).  The connection must time out to the disconnected adapter before Windows attempts to make the connection locally.




      1.  Connect your computer to a network.




      2. Perform the following steps to force local connections.



      1. At the top of your simulator, open the "Virtual Machine" drop down menu.
      2. Open the "Virtual Machine Settings" dialog box.
      3. Select /Network Adapter/ on the left.
      4. On the right, change the network connection from "NAT" to "Host-only".
      5. Click "Ok".
      6. Reboot your whole computer.

      Note: When your computer comes back and you restart the simulator you will probably find that the IP address of the simulator is now different. You may need to change the target IP address in the BlackBerry SDK.

    14 pages