02-07-2014 07:34 AM
I have recently moved from Momentics IDE to Qt Creator, so I need to configure signing from the command line. I'm following this guide:
I have downloaded BB ID token as suggested and now I try to run this command:
blackberry-signer -storepass KeystorePassword bbidtoken.csk
It gives me:
"Error: error in opening zip file"
Which zip file is it talking about?
02-07-2014 08:40 AM
Try the following command instead, where the BAR_file.bar is the bar file you intend to sign and the KeysotrePassword is the password of your author.p12 file (your developer certificate).
blackberry-signer -storepass KeystorePassword BAR_file.bar
02-07-2014 08:49 AM - edited 02-07-2014 08:56 AM
I'm also using Qt Creator. Below is my deployment script, tweak the paths as needed:
#!/bin/sh source /Applications/bbndk/bbndk-env.sh sed -e "s,%SRC_DIR%,../UnitConverter,g" bar-descriptor.xml > ../UnitConverter-build-BB10Device-Release/bar-desc
riptor.xml cd ../UnitConverter-build-BB10Device-Release/ blackberry-nativepackager -package UnitConverter.bar -buildIdFile ../UnitConverter/buildId.txt -sign -storepass StorePassword bar-descriptor.xml
Put initial build number to buildId.txt (for example "1"). It will be autoincremented on each run of the script. This is optional. If not using build numbers, simply remove the -buildIdFile key.
1) Delete Release build folder
2) Build the project in Release mode, but do not run it! (otherwise it will generate the .bar file with development mode enabled)
3) Run the deploy script. The script will:
- Fix the paths in bar-descriptor.xml from tokens to real paths and will copy the file to build folder
- Take the build number from buildId.txt and automatically increment it
- Sign the bar file
p.s. bar file is actually a zip file, it can be unzipped and inspected.
02-07-2014 09:44 AM
I tried that, I get:
Error: Key RDK is not registered
AFAIK I have to configure the singing before I can sign bar files, so this error message doesn't surprise me.
02-07-2014 10:09 AM - edited 02-07-2014 10:10 AM
Hi again ondrejandrej,
Here are the steps to get your native environment setup for signing:
1) Create a BBID account here: http://blackberryid.blackberry.com
2) Create a BBID token (bbidtoken.csk) here: http://blackberryid.blackberry.com/bbid/login
3) Create a developer certificate (author.p12) using the blackberry-keytool command line tool or through the IDE.
Window->Preferences->BlackBerry->Signing dialog box->under the “Developer Certificate” section
I think what you are missing is step 3.
Basically, for signing you need to have two files, the bbidtoken.csk file (BlackBerry ID token) and the author.p12 file (developer certificate).
02-07-2014 10:20 AM
I should also note that we already have a published app in BB World and need to be able to update it (so far we used Momentics for development and for signing the .bar).
Anyway, I tried
blackberry-keytool -genkeypair -storepass <our passwd> -dname "cn=Our company"
That seems to have executed fine and generated author.p12 in ~/.rim
However, when I now run blackberry-signer, it gives me exactly the same errors as before.
02-07-2014 10:35 AM
In that case you need to link your existing signing keys to your BBID account as described in this blog post:
This will ensure that any bbidtoken.csk and author.p12 files associated with your account will be linked to your old signing information.