03-23-2011 10:57 AM
So I'm having never-ending issues trying to get my app signed. Attempting to do it from within Flash Builder Burrito with the Export feature doesn't work - it creates an unsigned bar file. Attempting to sign that bar file with the command line tool failes, because application-dev-mode is set to true (odd, I thought that was a 0.9.3 issue and I'm on 0.9.4). Attempting to build the package using the blackberry command line tool actually lets me create the package (although it oddly couldn't find my app icon, even though it was included), and this package is signable....but when I deploy this signed bar file, the simulator can't run it...I get this weird, quarter of the screen white box and nothing else.
I figured something was hosed, somewhere, maybe between my upgrades from 0.9.2 to 0.9.3 to 0.9.4. So I uninstalled FlashBuilder and the SDK, restarted, reinstalled both (as admin)...and now the Tablet OS is no longer a target platform! I've tried this about a half dozen times, same result.
Very frustrating. I do still have my compiled SWF file, but I don't know if something is wrong with it or not. Is there a way I can manually compile my application to a SWF without Flash Builder, then package/sign it with the command line tool, so I can get this thing submitted? Or, on the other side, any ideas why all these other problems keep happening?
03-23-2011 11:24 AM
There are lots of thread that cover this. Here is my script:
"C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\blackberry-tablet-sdk-0.9.4\bin\blackberry-
airpackager" -package <APP>.bar -installApp -launchApp -C bin-debug bin-debug/<APP>-app.xml bin-debug/<APP>.swf bin-debug/assets/splash.png bin-debug/assets/icons/app_icon_86.png bin-debug/blackberry-tablet.xml bin-debug/locale -password <DEV_PASSWORD> -device 192.168.xxx.xxx "C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\blackberry-tablet-sdk-0.9.4\bin\blackberry- signer" -verbose -cskpass <PASSWORD> -keystore "C:\data\flex4\signing\playbookcert.p12" -storepass <PASSWORD> <APP>.bar RDK "C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\blackberry-tablet-sdk-0.9.4\bin\blackberry- signer" -keystore "C:\data\flex4\signing\playbookcert.p12" -storepass <PASSWORD> <APP>.bar author
Some items may need to change for your app and some directories for the packaging may need to be removed (or changed)
03-23-2011 12:02 PM
Believe me I spent hours reading the threads last night, I know
Those are pretty much the same things I'm running from the command line. However, that assumes you have a properly compiled SWF file, and given my curiously non-functioning Flash Builder setup, I don't know if that's the case. Is there a way to compile my code to SWF without flash builder? A command line tool perhaps?
03-23-2011 12:15 PM
03-23-2011 12:58 PM - edited 03-23-2011 12:58 PM
Step1: Building AS to SWF: amxmlc -output AIRHelloWorld.swf -compiler.debug C:\workspace\AIRHelloWorld\src\AIRHelloWorld.as Alternatively, build it once on FB or FlashBuilder. The goal is to compile your code to get the .SWF file ==================== Step2: $> cd bin-debug Delete the .bar file that you just built. Keep everything else. ==================== Step3: Edit AIRHelloWorld-app.xml Search for the words "debug" and delete them in this file Also update the <versionNumber>0.0.0</versionNumber> with a new version ===================== Step4: Re-package the .bar file: C:\workspace\AIRHelloWorld\bin-debug> blackberry-airpackager -package AIRHelloWorld.bar AIRHelloWorld-app.xml AIRHelloWorld.swf blackberry-tablet.xml AIRHelloWorld.png images NOTE: in the above command, * AIRHelloWorld.bar is the output file. * Rest of parameters are files you should have under bin-debug folder. * In the example above i have a folder called "images" but you may have some other folder or may not have any other assests... you can just append any other files/folder you want to package at the end of the command. If all goes well, you should have a .bar file created. But it is unsigned ========================================= Step5: First sign the barfile with RDK: C:\workspace\AIRHelloWorld\bin-debug> blackberry-signer -verbose -cskpass <password> -keystore "C:\Users\Me\Desktop\blackberry\keys\bbdevcert.p12
" -storepass <password> AIRHelloWorld.bar RDK ========================================= Step6: Second sign the barfile with author: C:\workspace\AIRHelloWorld\bin-debug> blackberry-signer -keystore "C:\Users\Me\Desktop\blackberry\keys\bbdevcert.p12 " -storepass <password> AIRHelloWorld.bar author NOTE: the word "author" is not to be replaced with your name or any other name.. its a keyword - author The only things u need to replace above are your password and path to your certificate file. In the above example i placed my certificate file bbdevcert.p12 under a folder : C:\Users\Me\Desktop\blackberry\keys You may have it located somewhere else. ========================================= If all goes well so far you should have a signed bar file that you can test and publish. You can test the bar file by loading it on the simulator: C:\workspace\AIRHelloWorld\bin-debug> blackberry-deploy -installApp -launchApp -package AIRHelloWorld.bar -device 192.168.242.128 -password x NOTE: Replace the ipaddress and the password appropriately ========================================= To test if the barfile is really signed.. Copy AIRHelloWorld.bar to AIRHelloWorld.zip Unzip AIRHelloWorld.zip Follow instructions here to check: http://supportforums.blackberry.com/t5/Testing-and -Deployment/How-to-verify-your-BAR-file-is-fully-s ... ====================================
03-23-2011 11:30 PM
You'd think I'd learn not to post in IE9 because it just erases everything I type and makes a blank post....
Anyway, moral of the story is, I got errors trying to compile manually, so I tried to mess around with my existing packages more. I took a "signed' package that Flash Builder created (that wasn't really signed), unzipped it, re-packaged using the command line tool, and got the following error:
application.qnx is an unexpected element/attribute
Looking at the application XML file, it appears that my blackberry-tablet.xml file got appended to the application XML file by flashbuilder during the packaging process, and the command line tool doesn't like it. Remove that line, it packages, signs, deploys, and works! .....except, my splash screen no longer shows up. Its in the package, but there's no reference to how it should display it...so it doesn't!
Any ideas? If you unzip your signed bar file, is there a reference to the splash screen anywhere? Or is the blackberry-tablet.xml file explicitely included? I'm a bit confused here.