Wednesday, 25 May 2011

Flash Builder 4.5 - Deploying an unsigned Playbook application using a Debug Token

In my previous posting I explained how I created and deployed a debug token on the Blackberry Playbook Simulator. In this posting I explain the next step, deploying an unsigned application bar file using the command line procedure (as the Flash Builder UI process isn't working for non US environments - see previous posting).

I avoid to use the command line procedure to package (and deploy) the application bar file as the packaging is perfectly working from the Flash Builder UI. However, a few settings and hacks have to be done so that your FB 4.5 app will run on your Blackberry Playbook:

  1. The Playbook doesn’t support yet the Air SDK 2.6 (according to RIM an upgrade  will be provided around June 2011, which will fix this issue), and as a result of that you have 2 choices: you either use Flash Builder Burrito (with the Air SDK 2.5) or you need to add a little hack to your projects to remove any Air SDK 2.6 dependencies.

    The detailed explanation to this can be found on
    Jason’s Flex Blog.
  2. In addition what is said in the above blog entry, the advanced packaging options should be

    -forceAirVersion 2.5
    –devMode

    The reason for the –devMode option is that the (real) Playbook will otherwise not accept a deployment of an unsigned apps even though a Debug Token has been installed and the device is in Developer mode.

  3. Don’t forget the mentioned compiler option -swf-version=10
  4. Last but not least you need to add the AuthorID as created in the MANIFEST.MF file of the currently used debugtoken.bar file that must be installed on your Playbook device.
    • Open the debugtoken.bar file with for instance 7-Zip
    • In the META-INF folder you find the MANIFEST.MF file
    • Open it with a Notepad
    • Find the tag called Package-Author-Id: and copy the encrypted code into the clipboard
    • Open the blackberry-tablet.xml file of your project
    • Add a tag paste your id code here
    • You also need to add an tag (which is your vendor name as registered with RIM)

<
qnx>
<author>flexdomino.netauthor>
<authorId>gYAAg…siWgauthorId>
qnx>

OK, that’s it, we are half way through. Next step is to run the Export Release Build… function of the Flash Builder to finally use again the command line procedures to deploy the application.bar file on to the Playbook. For this I created a simple batch file:

C:

CD "\Program Files (x86)\Adobe\Adobe Flash Builder 4.5\sdks\blackberry-tablet-sdk-1.0.1\bin\"

blackberry-deploy -installApp -devMode -launchApp -package "D:\BlackberryApps\mobilenotes\mobilenotes.bar" -password xxx -device your_device_ip

The -password must match the password set for the Playbook device and the –device  ip address can be found here…




As shown in the screen shot, do not forget to change your device to Development Mode from the security settings. And as said earlier, you require a valid debug token to be installed on the device.

To remove the app from the device I created yet another batch file:

C:

CD "\Program Files (x86)\Adobe\Adobe Flash Builder 4.5\sdks\blackberry-tablet-sdk-1.0.1\bin\"

blackberry-deploy -uninstallApp -package "D:\BlackberryApps\mobilenotes\mobilenotes.bar" -password xxx –device your_device_ip 
 

No comments:

Post a Comment