Package your BlackBerry 7 or earlier app
To package your app, you must run the BlackBerry WebWorks Packager, which is included with the BlackBerry WebWorks 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.
- 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 <version>
For Mac OS:cd "/Developer/SDKs/Research In Motion/BlackBerry WebWorks SDK <version>"
- Package the
app by using the following syntax:
bbwp [drive:][path]archive [-o dir]
Windows example:
bbwp C:\myapp\test.zip -o C:\myapp\output
Mac OS example:
./bbwp ~/myapp/test.zip -o ~/myapp/output
During the packaging process, the BlackBerry WebWorks Packager displays multiple messages, and indicates successful completion if the app archive contains no errors. If successful, this process creates an unsigned .cod file in the folder specified by the -o parameter. If no -o parameter is specified, the .cod 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 smartphone must be connected through Wi-Fi to access the IP address.
Windows example:
bbwp C:\myapp\test.zip -d -o C:\myapp\output
Mac OS example:
./bbwp ~/myapp/test.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.