Develop Playbook applications using WebWorks Tablet OS SDK + Ripple (Part 3)
When submitting apps to the Blackberry App World you need to make sure they are signed. The Submission page will let you upload an unsigned app which will cause problems when you try to upload a signed version later on. It is important to note that an app will not be accepted if it is not signed.
I learned this the hard way after I submitted an unsigned version of my RegexRaptor app.
This article aims to explain how to:
- Obtain a code signing certificate from RIM
- Configure code-signing on your development machine (Windows)
- Package and sign your app
- A few notes on the app submission process
Articles One and Two are available for additional reference
Notes:
- Code Signing landing page (bdsc.webapps.blackberry.com)
- Code signing key request page (bdsc.webapps.blackberry.com
- Steps to sign your app (bdsc.webapps.blackberry.com)
Part 1: Request the code signing certificate
Before you can sign code you need to have a code signing certificate. There is a multi-step process to obtaining a certificate:
- Go to the code signing key request page
- Fill out all the information listed:
- First name
- Last name
- Company
- Country
- Registration PIN (You get to pick this)
- Type of key (Tablet / Handheld / both)
- Checkbox indicating you agree to the license agreement
- After you click the Submit button it will take a few hours for the request to be processed.
- You will receive 2 emails from RIM, each containing a .csj file:
The client-RDK-xxxxxx.csj file is used to sign apps for release
The client-PBDT-xxxxxx.csj file is used for generating debug tokens for testing
Part 2: Register your code signing certificate with RIM and Install it
Once you receive the .csj files they will need to be installed. RIM has a good article on that here.
These are the steps I took to install my code signing files:
- Save the .csj files
- Open a command prompt
- cd to C:\Program Files (x86)\Research In Motion\BlackBerry WebWorks SDK for TabletOS 2.2.0.5\bbwp\blackberry-tablet-sdk\bin
- Run the following command to install & register you code signing certs:
blackberry-signer -register -csjpin <csj pin>
-storepass <KeystorePassword> <client-RDK-xxxxxx.csj file>
<client-PBDT-xxxxx.csj file>
Notes on the command: - The csj pin was setup on the request page (Step 1)
- The KeystorePassword can be anything you want. It will protect your signing keys, so make it reasonably secure
- List the path to the RDK file first, then the PBDT file second
- Here is what my CLI / command line looked like when I setup my certs:
Text version of the above:
C:\Program Files (x86)\Research In Motion\BlackBerry WebWorks SDK for TabletOS 2.2.0.5\bbwp\blackberry-tablet-sdk\bin>blackberry-signer -register -csjpin PUT_PIN_HERE -storepass PUT_STORE_PASS_HERE C:\Source\Blackberry_Playbook\App_Signing_Keys\client-RDK-1918155555.csj C:\Source\Blackberry_Playbook\App_Signing_Keys\client-PBDT-1918155555.csj
Info: CSK file created.
Info: Developer certificate created in C:\Users\rion\AppData\Local\Research In Motion\author.p12
Info: Successfully registered with server.
Info: Successfully registered with server.
If all goes well you should have 3 files in %HOMEPATH%\AppData\Local\Research In Motion:
author.p12
barsigner.csk
barsigner.db
Be sure to backup these files!
Part 3: Package & Sign your app
RIM has an article on signing your tablet app. Here is what I did to sign my app:
Build it: (See Part 2 for more info on this)
- Open your app in the Ripple emulator
- Click the Wrench Icon and select Package
.. Be sure to setup your settings correctly!
In my case I was not able to sign my app using the ripple emulator (kept failing)
Sign it:
- Open a command prompt
- cd to C:\Program Files (x86)\Research In Motion\BlackBerry WebWorks SDK for TabletOS\bbwp
- Run this command to sign the app:
bbwp <archive_file> -g <KeystorePassword> -buildId <num> -o <output_location>
Explanation of the command:
1. archive_file is the .zip output from Ripple
2. KeystorePassword is the password you setup in Step 2 above
3. num has to be incremented each time you build. I just started with '1' and it worked
4. output_location is where you want the signed .bar file to be output to
Here's the CLI output from my signing command:
Text version of the output:
C:\Program Files (x86)\Research In Motion\BlackBerry WebWorks SDK for TabletOS 2.2.0.5\bbwp>bbwp.exe C:\Source\Blackberry_Playbook\jsRegex\jsRegex_pkg\jsRegex.zip -g KEYSTORE_PASSWORD_HERE -buildId 1 -o c:\Source\Blackberry_Playbook\jsRegex\jsRegex_signed
[INFO] Parsing command line options
[INFO] Parsing bbwp.properties
[INFO] Validating WebWorks archive
[INFO] Parsing config.xml
[INFO] Populating application source
[INFO] Compiling WebWorks application
[INFO] Packaging the bar file
[INFO] Bar packaging complete
[INFO] Starting signing tool
[INFO] Signing complete
[INFO] WebWorks application packaging complete
Step 4: Notes on submitting to RIM
At this point you should have a valid, signed .bar file you can submit to RIM using their ISV Portal. Before you submit, make sure that you have:
- 86x86 icon file in your project, properly referenced in the config.xml
- 480x480 icon file (asked for during submission process)
- 1200x600 (worked for me) splash screen image in your project, and in in the config.xml
- 1920x1186 (really RIM? 1186?) Panorama / featured image (requested during submission)
- Screenshots no greater than 640x640 (I had to resize my playbook screenshots)
Other things you may need to consider before submitting:
- If your app utilizes web services, make sure the access attribute is setup correctly in the config.xml file (see the doc for details)
- Try using a non-ripple emulator to see if it works (For help see this article)