Ludicrous Software

Testing Flash Pro Apps in the PlayBook Simulator

I’ve been porting Poker Solitaire to AIR so that I can try it out on the many devices that support AIR, and I figured I’d try it out on the BlackBerry PlayBook simulator. This seemed like it would be a piece of cake, using a bit of command-line magic that Renaun Erickson posted the other day.

Once I got everything set up and tried out the command that Renaun posted, I was hit with this error:

Invalid manifest file /var/folders/Aj/Ajh+J3lmHMOZEugDRh+2w++++TI/-Tmp-/bar2848332864678356027.MF.
Invalid value '' for Package-Author.

I’m not really sure what’s wrong there - and Googling provided little insight, especially as I couldn’t find any reference to “Package-Author” in the AIR descriptor xml file. I took apart the .bar file that had been generated, and there is an entry in the manifest file for Package-Author, but it was empty. Adding a value to it didn’t help.

To figure out what was going on, I created a Hello World app in Flash Builder, following the instructions provided in the “Getting Started Guide”. This worked perfectly fine.

I compared the xml files generated by both Flash Builder and Flash Pro, and it looks like all the extra stuff thrown in by Flash Pro is screwing things up somehow. I copied the Flash Builder xml file over, edited it by hand to point to my various files, and was then able to build and install in the PlayBook simulator.

So, if you’re trying to take an .apk file created by Flash Pro to the PlayBook and are getting that error, check out your xml file, as that may be the culprit. Here’s what ended up in my application.xml file:

1
2
3
4
5
6
7
8
9
10
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<application xmlns="http://ns.adobe.com/air/application/2.5">
<id>com.ludicroussoftware.games.pokersolair</id>
<filename>PokerSolAIR</filename>
<name>PokerSolitaire</name>
<versionNumber>1.0.0</versionNumber>
<initialWindow>
<content>PokerSolAIR.swf</content>
</initialWindow>
</application>

Now that it’s down to just that, it seems to work fine. (There are probably other, easier ways to take a Flash Pro project to the PlayBook, and it will no doubt get easier as the SDK and Flash Pro evolve. But for now, this seems to work!)