PlayBook (.bar) Application Signing Roundup
NOTE: There is an AIR application that was created to help with signing and other Tablet OS common commands. Check it out here.
I wanted to post a round up post to both serve as an overview for new people but gather a bunch of info in one place for others that might have been through the process.
RIM’s development model requires signing. You need signing to get .bar applications on the device, both for developing and when you submit to the app store. It might be a bit confusing because the processes for both are similar but different, and I haven’t even thrown the “debug token” process into the mix.
So the goal of this post is to take you from code to device (both development workflow and App World ready) all through links and info available on the web. First some definitions and overview.
Handy Definitions:
- signing – The process of signing the .bar file, in PlayBook world includes requesting keys from RIM, creating a cert, registering csj files, and multiple csj files for different signing processes.
- PIN – PlayBook device identification number that you will retrieve from the physical device. Also a term for the passwords from signing keys.
- .csj files – files used in the signing process RDK (for apps) and PBDT (PlayBook Debug Token) used for the “debug token” process.
- vendor – The account you have with RIM, its not just a developer account but the account that is tied to payments and App World submissions, they have a slightly different process for individual vs cooperation.
- debug token – This provisions a device to allow .bar apps to work on a particular device that has the token to run with out signing of the .bar file. A token can be configured to have multiple device PINs. The tokens expire after 1 month.
- BlackBerry Tablet OS plugin – A Flash Builder plugin provided by RIM to allow for a bunch of UI dialogs to help with signing, build/packaging, csj registering, and debug tokens.
BlackBerry Tablet OS for AIR SDK – Copies over the AIR sdk and adds BlackBerry Tablet OS specific tools (see next). - blackberry-airpackager, blackberry-deploy, blackberry-signer – The command line tools provided in the BlackBerry Tablet OS SDK that are used for building, packaging, and signing .bar applications. Same tools used in the BlackBerry Tablet OS plugin as well.
Overview:
- Get an Vendor account with RIM (more then a couple hour process)
- Request signing keys (more then a couple hour process), this PIN (password really) needs to be remember.
- Create certificate (cn value is important)
- Register signing keys properly.
- Create and upload a debug token with PBDT signing key if you want to develop with none signed apps. With debug token on devices all you need is author/authorId correct in .bar file, note tokens expire in a month.
- Sign .bar application, make sure its in production mode.
Here is the links that get into the details of the overview above:
RIM’s docs on signing your application with Flash Builder 4.5. My note here is read through all the doc pages first before starting and pay attention to the notes and details.
RIM’s documentation on debug tokens.
Julian Dolce showing off debug tokens and how they work
Command line walkthrough on how to sign your .bar applications. (might be dated)
Command line walkthrough on how to sign your .bar applications. (might be dated)
How to verify your BAR file is fully signed
TroubleShooting
RIM’s knowledgebase for signing related issues/questions. Here are some common issues that I see people have:
- Code signing request failed because this file has been previously signed
- When creating a Debug Token from Flash Builder, the process fails with exception “Unable to parse issue date from debug token” (locale is not English)
- Debug token shows as not valid when uploaded to the BlackBerry PlayBook
- Code signing request failed because Application-Development-Mode is present and not set to [false]
- “Unable to register client ‘,’ (ID:) because they have exhausted their registration attempts”
- Attempt to rename [value1] to [value2] failed
- Code signing request failed because Application-Development-Mode in Manifest is present and is not set to false
- Code signing request failed because Common Name in developer certificate is not [value]
- Code signing request failed because this file has been previously signed
- Code signing request failed because Package-Author in Manifest is not set to [value]
- Code signing request failed because value of Package-Name in Manifest is not allowed
- -cskpass and -csjpin must be specified if -register is specified
- cskpass required
- Developer certificate and private key not found in keystore or store password not supplied
- Incomplete certificate chain
- Key associated with [value] not a private key
- Keystore load: store password incorrect
- keytool error: java.io.FileNotFoundException: certificate.p12 <Access is denied>
- keytool error: java.io.IOException: Incorrect AVA Format
- keytool error: java.lang.Exception: Key pair not generated, alias
already exists - Missing parameter for [option_name] option
- No BAR file or CSJ file specified
- No key name specified
- No manifest
- Only one of -setup, -register, or -verify can be specified
- Server is not responding
- Unable to open BAR file
Pingback: Good Roundup of Resources Explaining PlayBook App Signing - BerryReview
Pingback: Good Roundup of Resources Explaining PlayBook App Signing - BerryReview