Package your BlackBerry PlayBook app

To package your app, you must run the BlackBerry WebWorks Packager, which is included with the BlackBerry Tablet OS SDK. The BlackBerry WebWorks Packager takes your app archive file, packages it, and then creates the file needed for deployment.

Before you begin: Make sure you created your app archive file (.zip) with all the required elements and objects. For more information, see Creating a BlackBerry WebWorks archive file.

  1. At a command prompt, navigate to the installation folder for the BlackBerry WebWorks Packager. The file path may vary based on where you installed the BlackBerry WebWorks Packager.
    For Windows:
    cd C:\Program Files\Research In Motion\BlackBerry WebWorks SDK for TabletOS<x.x.x.x>\bbwp
    For Mac OS:
    cd "/Developer/SDKs/Research In Motion/BlackBerry WebWorks SDK for TabletOS<x.x.x.x>/bbwp"
  2. Package the app by using the following syntax:
    bbwp [drive:][path]archive [-o dir]

    Windows example:

    bbwp C:\myapp\myarchive.zip -o C:\myapp\output

    Mac OS example:

    ./bbwp ~/myapp/myarchive.zip -o ~/myapp/output

    During the packaging, the BlackBerry WebWorks Packager displays multiple messages, and indicates successful completion if the app archive contains no errors.

  3. If successful, this process creates an unsigned .bar file in the folder specified by the -o parameter. If no -o parameter is specified, the .bar file is created in a subfolder named "bin" that's located in the same folder location as the archive file.

Enable Web Inspector

You can use the -d option flag when you package your app file. This allows you to use a WebKit desktop browser such as Google Chrome and the Safari browser to navigate to the IP address of the device or simulator where you can view the currently loaded page source in your browser. You can also view the IP address in the device or simulator when you run your app. This is a good way to test and debug your code. Your BlackBerry tablet must be connected through Wi-Fi to access the IP address.

Windows example:

bbwp C:\myapp\myarchive.zip -d -o C:\myapp\output

Mac OS example:

./bbwp ~/myapp/myarchive.zip -d -o ~/myapp/output

With your app running in the simulator, in a desktop browser, type http://<IP address of simulator>:<port number>.

Only use the -d option when you build development versions of your app. Do not use it when building release versions (involving code signing). Leaving the debugging port open may allow unintentional access to your app.