Playbook Development with FDT and ANT
I just put up a sample FDT project on github which gets you started with BlackBerry Playbook development with FDT. I comes with an ANT build.xml which pretty much does all the work for you.
Setting up Playbook SDK and Simulator
There are a few good tutorials out there which explains the setup process in detail, so I don’t want to bother you with that … and it’s really straightforward anyway.
Setting up FDT
First of all you need to setup an ANT property. Go to Eclipse Settings -> ANT -> runtime -> Properties -> Add Property and type in the name “BB_TABLET_SDK_HOME” and as value the path to your installed Playbook SDK. Insert another property with the name “FLEX_HOME” and point it to the same location … you’ll need this to use the mxmlc task.
The Playbook SDK is basically just a AIR SDK with a little extra spice … so you can add the SDK to your FDT settings like you do with every other SDK.
After that you can create a new project or download my sample project from github. Create “Empty AS3 AIR Project” and select the installed Playbook SDK in my case “BlackBerry Tablet OS SDK 0.9.1 for Adobe AIR”.
your project structure should look like this:
FDT doesn’t add the blackberry specific SWCs automatically to the project, you have to do this step manually. To do that open your project properties -> FDT Build Path -> SDK Library -> Select SWCs and select the blackberry.swc, qnx-screen.swc and qnx-air.swc …
that’s it!! now you can use the build targets to compile your App and deploy it to the simulator.
After running the debug-deploy target you’ll probably look for any trace output. The SDK ships with another tool you can use to debug your App it’s called fdb. Open a terminal window and launch the fdb tool, once the Flash Debugger opens issue the command “run”. The debugger times out if nothing connects within about 60 seconds, yo you should immediately start you debug-deploy target after running the debugger.
Your application should deploy and connect to the debugger but probably it’ll take a bit before the simulator connects. If you have a firewall it can interfere with the simulator’s ability to connect, make sure port 7935 is open. When the simulator connects you will be prompted to enter breakpoints. If you don’t want to add any breakpoints just type “continue” and your Application will start up and you’ll see the trace output in you terminal.