Search code examples
blackberry-playbookblackberry-webworks

Error packaging and signing BlackBerry WebWorks SDK application for Playbook


I've been trying to follow the BlackBerry docs on signing a WebWorks SDK application on the command line and uploading to App World.

Here is a chart showing the high level picture, and here are the detailed instructions I am trying to follow.

I ran the first few steps successfully:

C:\MyDir>blackberry-signer -csksetup -cskpass <mypwd>
CSK file created.

C:\MyDir>blackberry-signer -register -csjpin <mypin> -cskpass <mypwd> client-RDK-<snip>.csj
Successfully registered with server.

C:\MyDir>blackberry-keytool -genkeypair -keystore sigtool.p12 -storepass <mypwd> -dname "cn=<My Company>" -alias author
<No output!>

The instructions now say I need to package my BAR file. It links to another web page that says to run a command like this:

blackberry-airpackager -package output_filename project_name-app.xml project_name.swf any_other_project_files

Although that sounds like it applies to an AIR application instead of a WebWorks SDK one I try it anyway, and I get an error:

C:\MyDir>blackberry-airpackager -package output\MyApp.bar config.xml input
C:\MyDir\config.xml: error 102: Invalid namespace http://www.w3.org/ns/widgets
Error: AIR validation failed

I then see if either of the blackberry-packager or blackberry-nativepackager commands is the right one. Running blackberry-nativepackager yields this error Error: not qnx tag or two many, and the usage of blackberry-packager seems to be inappropriate, e.g.

Usage:
  blackberry-packager -generatemanifest [<manifest-file>]
  blackberry-packager -verifymanifest <manifest-file>
  blackberry-packager -metafolder <META-INF folder> [-javafolder <java-folder>] [-datafolder <data-folder>] [-nativefolder <native-folder>] [-airfolder <air-folder>] [-nocompression] <barfile.bar> (<inputfile>)*

So, I now revert back to packaging as I originally did during my testing, i.e. I create a ZIP file and use bbwp.exe:

C:\MyDir>bbwp.exe "MyApp.zip" -o "output"
[INFO]                  Parsing command line options
<snip>
[INFO]                  Packaging the bar file
[INFO]                  Bar packaging complete
[INFO]                  WebWorks application packaging complete

That looks good so I move onto the final two steps, which are:

blackberry-signer -verbose -cskpass <mypwd> -keystore sigtool.p12 -storepass <mypwd> output\MyApp.bar RDK
blackberry-signer -keystore sigtool.p12 -storepass <mypwd> output\MyApp.bar author

Unfortunately the first of these steps fails:

C:\MyDir>blackberry-signer -verbose -cskpass <mypwd> -keystore sigtool.p12 -storepass <mypwd> output\MyApp.bar RDK
<snip>
42 43 65 30 58 31 19 36 79 22 50 64 71 12 38 4e
74 68 78 34
Connecting to url http://www.rim.net/Websigner/servlet/RDK-Waterloo
Sending properties to server...
Properties of response := [
Version = 1
Response = Signature Response
Confirm = null
Error = Code signing request failed because Application-Development-Mode in Manifest is present and is not set to [false].
]
barsigner error: server error: Code signing request failed because Application-Development-Mode in Manifest is present and is not set to [false].

That exact error is documented here, along with this explanation of it:

Code signing request failed because Application-Development-Mode in Manifest is present and is not set to false
Description
This message appears when you try to sign a .bar file that was packaged in Development mode. Possible solution
Repackage the .bar file. If you use blackberry-packager, or another command line tool, do not include the debug option in your command line.

Unfortunately that doesn't help me at all. My understanding is that the config.xml file in the WebWorks SDK replaces the need for a MANIFEST.MF file.

Can anybody help me with this misery?


Solution

  • As I suspected, my problem appears to be that I was following the signing instructions for an AIR application, not a WebWorks SDK application.

    Here are the WebWorks SDK instructions to follow, along with summary steps below.

    blackberry-signer -csksetup -cskpass <mypwd> 
    blackberry-signer -register -csjpin <mypin> -cskpass <mypwd> client-RDK-<snip>.csj    
    blackberry-keytool -genkeypair -keystore sigtool.p12 -storepass <mypwd> -dname "cn=<My Company>" -alias author 
    bbwp.exe "MyApp.zip" -gcsk <mypwd> -gp12 <mypwd> -o "output"
    

    I had originally followed these steps successfully, and my confusion started because BlackBerry sent me an e-mail after my first submission which said:

    Also, to make your app available for download, there is one additional step. Each app must be “signed” and resubmitted into BlackBerry App World; if you haven’t signed your application please review our blog post that contains the needed information to sign your application. Please sign your application and resubmit to BlackBerry App World. When resubmitting add “_signed” to the end of the bundle name and rest assured you will not lose your spot in the review queue.

    I e-mailed them asking them to confirm if there was a problem with my signing, and I hadn't got a reply after 5 days, so I thought I may have followed the wrong instructions. :-(

    FTR, this question was cross posted with the BlackBerry developer forum here.