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:
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:
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.
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.
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:
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 188.8.131.52\dependencies\tools\bin
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.
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.
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.
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.
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 air.com.mypackage.myapp. 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
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.
At the top of your simulator, open the "Virtual Machine" drop down menu.
Open the "Virtual Machine Settings" dialog box.
Select /Network Adapter/ on the left.
On the right, change the network connection from "NAT" to "Host-only".
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.