How to export to Blackberry 10

1

Stats

3,552 visits, 8,083 views

Tools

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

BlackBerry 10 is a new mobile platform which allows apps to be developed directly in HTML5. It also has a great browser with WebGL support, meaning you can take advantage of shader effects and enhanced performance!

Before you begin

Your game will need to support multiple screen sizes and work with touch controls.

To test everything is working, you can preview over Wifi on your BlackBerry 10 device to test how it will work in the browser. This is a great way to develop quickly, and it's accurate since the finished app will use the same browser engine to run the game.

Make sure the About section in Project Properties is correctly filled out. You also need to provide an ID, which is a unique ID for your app. Convention is to use a reverse-domain format, such as com.scirra.spaceblaster.

First-time setup

You only need to do this section once, the first time you ever export to BlackBerry 10. Once you're set up you can skip these steps each time you export.

First you'll need to install the BlackBerry WebWorks SDK so you can package and deploy your app to the App World. If you have a real BlackBerry 10 device, you won't need the ripple Emulator nor the simulator - using preview-over-Wifi on the real device is better. If you don't have a real device but still want to experiment with BlackBerry 10 support you may find those tools useful, but it's highly recommended to have a real device to test on. The rest of this guide will assume you have a device.

You must also request code signing keys. These allow you to securely identify yourself as the author of any apps you publish. To get your keys, visit https://www.blackberry.com/SignedKeys/codesigning.html and fill out the form. Be sure to select the option for BlackBerry 10. Take care to remember your Registration PIN. Once requested, a couple of hours later you should receive two .csj files by email, with names in the format:

client-RDK-xxxxxx.csj

client-PBDT-xxxxxx.csj

To complete the setup, open Construct 2 and choose to export for BlackBerry 10. Proceed to export as normal, then when the BlackBerry 10 options dialog appears, click the link that says Click here to install code signing keys.

In the dialog that opens, fill out all the fields, such as the paths to the .csj files. You'll need to re-enter the Registration PIN you created earlier, as well as create a new Signing password. Take care to remember your signing password - you'll need it every time you export in future!

Click Install on the dialog. The dialog should close. A console window may briefly appear - this is just Construct 2 doing the signing for you automatically.

You're now set up ready to export for BlackBerry 10!

Exporting

When you export, you'll need the BlackBerry WebWorks install path (which should be remembered from when you installed the code signing keys). You can choose an orientation lock, and then enter your signing password.

Note the Version must change every time you export. For example, if you try to export version 1.0.0.1 twice, the second time will fail. To fix this, simply increase one of the numbers, e.g. to 1.0.0.2. If you change the version in the Export dialog, Construct 2 will also update the Version in Project Properties. This means every time you see this dialog, you just need to update the last number in the version and you should be fine.

When you export, note there are some additional files. Your project is actually exported to a subfolder within the export folder, for example:

\MyExportFolder\Space Blaster\

Double-check the app's icon (icon_114.png) is what you intend it to be. By default it is copied from the Icons subfolder in the Project Bar. If you know how BlackBerry 10 config.xml files work, you can also make any changes you want to it at this point.

In the export folder there are some additional files. Open the export folder, and locate the additional two files, deploy_bb10_app.bat and package_bb10_app.bat.

Packaging and deploying

First it is necessary to package the app. This bundles together all the separate files in to a single .bar file representing your app.

Simply double-click package_bb10_app.bat and it will automatically package everything together. Once finished, some new subfolders should appear: device and simulator. These contain your .bar file for real devices, or for the simulator. When submitting to the App World, be sure to use the .bar file from device.

You can test your finished app on a BlackBerry 10 device if you have one. On the device, navigate to Settings -> Security and Privacy -> Development mode. Set Use development mode to On, and take note of the Development IP address. Then connect the device to your computer using the USB cable. You may need to wait a few moments for the computer to recognise the device. If you're doing this for the first time, you may also be prompted to install 'BlackBerry Link' - be sure to install this, since it's required for the link between the computer and device to work.

Now open deploy_bb10_app.bat in a text editor - we need to adjust parts of the file for it to work correctly. By default it looks a bit like this:

"C:\Program Files\WebWorks SDK\dependencies\tools\bin\blackberry-deploy" -installApp -password mypassword -device 169.254.0.1 -package ".\device\Space Blaster.bar"

Note the sections in bold. You need to replace these. Substitute mypassword for the device password - that's what you enter in the lock screen, not the signing password - and make sure the IP address matches what was displayed for Development IP address in the device's Development Mode settings. Once updated, save the changes, and run the .bat file. After a few moments the app should appear on your device. Note this is useful for a final test as a real app, but preview-over-Wifi will be a lot more convenient during the actual development of the project.

Submitting

You can now submit your .bar file (from the device folder) to the App World. Visit this link to get started:

https://appworld.blackberry.com/isvportal/home.do

There's also a video tutorial by Tom Anderson, a BlackBerry Developer Evangelist, covering the App World submission process in more detail:

Subscribe to Construct videos now

Happy submitting!

  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!