Deploying a black berry webworks app to the playbook from windows


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Deploying a black berry webworks app to the playbook from windows

  1. 1. Deploying a BlackBerry WebWorks app to thePlayBook from WindowsFriday, August 05, 2011PreparationBefore you attempt to deploy a WebWorks app, fill out the BlackBerry Code Signing KeysOrder Form While this costs you nothing, there isa 24 to 48 hour delay to receive your key, so try to do this as soon as possible. You willeventually receive two *.CSJ files (client-PBDT-xxxxxx.csj and client-RDK-xxxxxxx.csj) bye-mail that will allow you to complete the rest of this process: A „PDBT‟ token used duringyour debugging, and an „RDK‟ token used to sign your completed app when you submit it tothe App World. Make note of your Registration PIN and remember it as you‟ll need this in astep listed below.Step OneDownload Adobe AIR SDK 2.7 and the BlackBerry WebWorks SDK for Tablet OS for Windows.(For the WebWorks SDK download, you‟ll need to register before you can download the EXEinstallation file.)Step TwoUnzip the Adobe AIR SDK to C:Program Files (x86)AdobeAIRSDK . Install the WebWorksSDK to the default location (on my Windows XP PC, that was to C:Program Files ResearchIn MotionBlackBerry WebWorks SDK for TabletOS ).Step ThreeNow that we‟ve got all of the utilities of the SDK set up, we‟ll set up our Windows PC to be ableto sign applications to be deployed to a tablet in development mode. Open a CommandPrompt and input the following:1 cd ".bbwpblackberry-tablet-sdkbin"2 blackberry-keytool -genkeypair -keystore <sigtool.p12> -storepass <myp12password> -dname "cn=My Company Name" -alias author3 blackberry-signer -csksetup -cskpass <mycskpassword>
  2. 2. 4 blackberry-debugtokenrequest -register -cskpass <mycskpassword> -csjpin <myregistrationpin> <mycsjfile.csj>To explain each of these lines step by step:  Line #1 changes the directory to the bin folder of the BlackBerry Tablet SDK.  Line #2 creates the file sigtool.p12 file using the password value of myp12password and the author My Company Name. Not that My Company Name is the company name sent to you during the signing registration process, and you must type the word "author" as it appears here.  Line #3 sets up long term keys for communication with the signing authority server under the password mycskpassword, and generates the file mycsjfile.csj.  Line #4 registers your machine with the signing authority server, referencing your CSK password of mycskpassword, the Registration PIN you entered in the BlackBerry Code Signing Keys Order Form (myregistrationpin) and the „PDBT‟ *.CSJ file (client-RDK-xxxxxxx.csj) you received via e-mail.Step FourTo move forward, we need an app to deploy. For the purposes of this guide, let‟s deploy asample application we know works. Download Marco van Hylckama Vlieg‟s Unit Converterapplication from GitHub ( click the Downloadsbutton on the right side, select the *.ZIP file). Unzip that application into a local directory (forour example, C:DevelopmentUnitConverter ).Step FiveCreate a zipfile out of the contents of C:DevelopmentUnitConverter (the root directoryshould have config.xml in it, not a directory containing that file and others) and place itat Then run the following command which willcreate the file 1 ".bbwpbbwp.exe" "" -o "C:Development"Step SixLet‟s prep our physical PlayBook tablet to accept apps in development mode. Swipe downfrom the menu screen to reveal the configuration menu. Select Security, DevelopmentMode, and set Use Development Mode to On. You‟ll be required to set a password, whichfor this example will be devicepassword.When this is complete, swipe the configuration menu back upwards and take notice of thenew icon of a person with a gear in the top-right corner of the PlayBook‟s display. Tap this
  3. 3. icon to reveal the Development Mode menu. Take note of the IP Address value, as we‟llneed it for the next step (for this example, we‟ll use the value of SevenOur next step is to create a debug token that allows us to place test versions of applicationson our PlayBook tablet. Open a Command Prompt and input the following:1 cd ".bbwpblackberry-tablet-sdkbin"2 blackberry-debugtokenrequest -cskpass <mycskpassword> -keystore sigtool.p12 -storepass <myp12password> -deviceId <0x12345678> ""3 blackberry-deploy -installDebugToken "" -device -password <devicepassword>To explain each of these lines step by step:  Line #1 changes the directory to the bin folder of the BlackBerry Tablet SDK.  Line #2 creates a debug token as a *.BAR file, requiring your mycskpassword, your keystore file sigtool.p12, the password to your keystore myp12password, your PlayBook‟s PIN (About > Hardware > PIN) with the characters 0x placed in front (0×12345678), and the path and filename of the new debug token file,  Line #3 transmits the debug token to your PlayBook, requiring you to input the tablet‟s IP address and the password you set in development mode, devicepassword.Step EightWe need to add a blackberry-tablet.xml file to your application (it’s important), andwill need to retrieve two values from our packager first. Run the following:1 blackberry-airpackager -listManifest ""Scroll back up through the output and make note of the following values:1 Package-Author: My Company Name2 Package-Author-Id: gYg7vhn3Q-5hjwnvbn67ckm3uvnCreate a new file called blackberry-tablet.xml in the same folder of your appas config.xml with the following contents:1 <qnx>
  4. 4. 2 <author>My Company Name</author>3 <authorId>gYg7vhn3Q-5hjwnvbn67ckm3uvn</authorId>4 <category>core.all</category>5 <action>play_audio</action>6 <buildId>1</buildId>7 <platformVersion></platformVersion>8 <icon>9 <image>icon.png</image>10 </icon>11 </qnx>Step NineRe-do Step Five (create a zipfile, output a *.BAR file) to repackage your app with theblackberry-tablet.xml inside it.Step TenWould you believe this is the last step? It‟s straightforward, too – it simply deploys your*.BAR file to your PlayBook:".bbwpblackberry-tablet-sdkbinblackberry-deploy.bat" -installApp-password pass -device -package""You‟re Done!Assuming the result of your last step contained the message “result::success”, you‟re done!Take a look at your PlayBook‟s menus and select your application. It should start withoutissue and allow you to explore your app‟s performance on a real-world PlayBook device.As mentioned earlier, after this first deployment you‟ll only ever have to re-run Step Nine andStep Ten to load updated copies of your app onto the device (plus the occasional upload of anew debug token, as each last 10 days).References ws/