Configure your development environment
Before you can start developing for BlackBerry 10 OS, there are a few things that you need to do:
Register for code signing keys
Before you can test apps on a device or distribute apps on the BlackBerry World storefront, you'll need to register with BlackBerry to request an account and receive your code signing keys. You do not need code signing keys to test your app on a simulator.
When you request an account, you'll receive two CSJ registration files in separate emails:
- A RIM Development Key (RDK), which you use to sign your applications
- A debug token (PBDT) file, which you use to generate debug tokens
If you have already used the code signing keys to register another a BlackBerry 10 device or BlackBerry PlayBook tablet on your computer, you do not need to register a new set of code signing keys.
You can manage your code signing keys on the BlackBerry > Signing menu.
- Register: You must register before you can sign your app.
- Unregister: Clicking this button removes your keys. You will need to request new keys before you can sign your app.
- Backup: If you want to move your keys from one computer to another, use Backup. If you do not have a backup and you should lose your signing keys or forget your password, you will need to re-register with BlackBerry. After re-registering, new versions of your applications will appear as new applications and will not have access to shared data from previous versions.
- Restore: Once you have moved your keys from one computer to another, use Restore.
To register for code signing keys:
- Fill in the form at BlackBerry Keys Order Form and click Submit. You should receive your BlackBerry Code Signing Keys within two hours.
- Once you receive your two CSJ files, save the registration files on your computer.
- In Microsoft Visual Studio, on the BlackBerry menu, select Signing.
- In the BlackBerry Signing Authority section, click Register.
- In the Registration window, complete the RDK CSJ Path field and the PBDT CSJ Path field by browsing to the location where you saved the CSJ files.
- In the CSJ Pin field, enter the PIN that you used to fill out the code signing keys request form.
- In the CSK Password field, choose a password. This is the keystore password that you use to create a developer certificate.
- Confirm the password and click OK.
Enable development mode
To upload and test applications on a device, you need to enable Development Mode on your device. This mode allows you to remotely install and launch an application. If you don't intend to do development activities, disable Development Mode for increased security. If you reboot a device, Development Mode should be disabled automatically.
By default, Development Mode is set to On or enabled for the simulator.
To enable Development Mode on your device:
- On the home screen, swipe down from the top of the screen or find the Settings app on your home screen.
- Navigate to Settings > Security and Privacy > Development Mode.
- Set the Use Development Mode toggle switch to On.
- If prompted, enter the password for your device, and tap OK.
Set a device target
You need to select which version of the BlackBerry 10 OS you are going to use and then set either a BlackBerry Device Target or a BlackBerry Simulator Target. This target is used when you build your solution. You can connect a device to Microsoft Visual Studio using Wi-Fi or with a USB cable.
- In Microsoft Visual Studio, on the BlackBerry menu, select Settings.
- In the BlackBerry NDK Settings section, in the NDK Path drop-down list, select the version of the BlackBerry 10 Native SDK you want to use to develop your app.
- If you are using a physical device, under BlackBerry Device Target, in the IP Address field, enter the IP address for the BlackBerry device attached to your computer.
- If you are using a simulator, under BlackBerry Simulator Target, in the IP Address field, enter the IP address for the simulator.
- Enter the password for your BlackBerry device or simulator.
- Click OK.
Install a debug token
A debug token allows you to deploy unsigned applications on a device. You do not need to complete these steps if you are using a simulator.
Before you complete these steps, ensure that you have requested signing keys. For more information, see Register for code signing keys. Also, make sure that you have set up your device target. For more information, see Set a device target. Note that you can only register one device at a time.
- In Microsoft Visual Studio, on the BlackBerry menu, select Debug Tokens.
- If you haven't set up your signing keys you will be asked to enter your password. In the Reset CSK Password dialog, enter your CSK Password, and click OK.
- In the Password successfully reset dialog, click OK.
- In the Debug Tokens dialog, click Add.
- Click Close.
If your application will no longer run on your device, your debug token may have expired. You can generate a new one using the same CSJ keys. To generate a new one, on the BlackBerry menu, select Debug Tokens and click Renew.