banner



How To Develop Blackberry 10 Apps

BlackBerry 10 Platform Guide

This guide shows how to gear up your SDK environment to deploy Cordova apps for BlackBerry 10 devices. For previous versions of BlackBerry, y'all need to apply a different SDK environment and set of control-line tools, described in the BlackBerry Platform Guide. For BlackBerry 10, you need to install the SDK regardless of whether yous desire to use the cross-platform Cordova CLI for development, or a narrower fix of platform-centered command-line tools. For a comparison of the two development paths, see the Overview. For details on each, encounter The Command-Line Interface and the BlackBerry 10 Shell Tool Guide.

Requirements

The development environment is available on Windows, Mac and Linux.

Developers should use the cordova utility in conjunction with the BlackBerry WebWorks SDK or BlackBerry Native SDK. See The Control-Line Interface for information how to install cordova, add projects, then build and deploy for each platform.

BlackBerry 10 Device Simulator:

  • Processor: Intel dual core 2.0 GHz/AMD Athlon 4200+ or higher
  • Disk space: 10 GB
  • RAM Retention: 4 GB
  • Virtualization: one of the post-obit:
    • Intel Virtualization Technology (VT, VT-x, vmx) → Intel VT-x supported processor list
    • AMD Virtualization (AMD-V, SVM) (Since May 2006 all AMD CPUs include AMD-V except Sempron).

More information almost requirements: BB10 Simulator requeriments.

Install the BlackBerry WebWorks SDK

Download and install the BlackBerry WebWorks SDK from developer.blackberry.com

The installer volition add control-line tools to your path. Depending on your OS, you may need to open a new last window or re-log in.

Install the BlackBerry Native SDK

If you demand to compile native code, for case when developing a native plugin, yous will need to install the BlackBerry Native SDK.

In order to get the BlackBerry Native SDK, download and install the IDE for BlackBerry bachelor from developer.blackberry.com, so using the IDE, install the BlackBerry Native SDK. Post-obit installation, yous need to add together its command-line tools to your system path.

On Windows:

  • Go to My Estimator → Backdrop → Advanced → Surround Variables.

  • Suspend the Native SDK's install directory to the PATH, for case:

                                      ;C:\bbndk\host_10_1_0_132\win32\x86\usr\bin\                              

On Mac and Linux:

  • Edit the ~/.bash_profile file, adding a line such as the following, depending on where the Native SDK was installed:

                                      $ export PATH=${PATH}:/Applications/bbndk/host_10_1_0_132/darwin/x86/usr/bin/                              

    or for the ten.ii Native SDK:

                                      $ export PATH=${PATH}:/Applications/Momentics.app/host_10_2_0_15/darwin/x86/usr/bin/                              
  • Run the following to apply the change in the current session:

If yous got any environmental problem, using the Native SDK from the command line, execute the appropriate file for your platform, located within the installation path:

  • On Windows → MS-DOS shell:

                                      C:\> \bbndk\bbndk-env_xx_xx_xx_xxxx.bat                              
  • On Windows → git fustigate shell:

                                      $ `\bbndk\bbndk-env_xx_xx_xx_xxxx.bat`                              
  • On Linux → Installed equally root user:

                                      $ `./opt/bbndk/bbndk-env_xx_xx_xx_xxxx.sh`                              
  • On Linux → Installed every bit non-root user:

                                      $ `./home/username/bbndk/bbndk-env_xx_xx_xx_xxxx.sh`                              
  • On Mac:

                                      $ `/Developer/SDKs/bbndk/bbndk-env_xx_xx_xx_xxxx.sh`                              

Set up for Signing

If y'all wish to test on a device or distribute apps through BlackBerry World, your organization must be setup for lawmaking signing.

To obtain a signing key, get to the [BlackBerry Keys Order Form] (https://world wide web.blackberry.com/SignedKeys/codesigning.html).

Select the commencement checkbox: "for BlackBerry10 apps developed using BlackBerry NDK" and so sign in or create a BBID.

Enter a countersign and click "Get Token" to download bbidtoken.csk. Save this file to the default location for your OS which will be displayed on the download page.

The final step is to generate a signing certificate:

            $ blackberry-keytool -genkeypair -storepass <password> -author 'Your Name'                      

Create a Projection

Utilize the cordova utility to prepare up a new project, equally described in The Command-line Interface. For example, in a source-code directory:

                          $ cordova create hello com.example.hello     $ cd how-do-you-do     $ cordova platform add blackberry10     $ cordova build                      

Deploy to Emulator

If you wish to run a device emulator, download and install the BlackBerry 10 Simulator.

  • Download
  • Getting Started

Before testing an app on either an emulator or a device, you demand to enable development mode.

Launch the emulator image, then choose Settings from the home screen:

Navigate to the Security and Privacy → Development Mode section and enable the pick:

An additional set of command-line utilities are included when yous set up the BlackBerry 10 platform for your projection. The following command, in this instance invoked from the projection summit-level directory, associates a target named emu with the IP address displayed above.

  • On Windows:

                                      $ platforms\blackberry10\cordova\target.bat add emu 169.254.0.1 -t simulator                              
  • On Mac/Linux:

                                      $ platforms/blackberry10/cordova/target add together emu 169.254.0.1 -t simulator                              

And so, run the emulate command to view the app:

                          $ cordova emulate blackberry10                      

Deploy to Device

To deploy to a device, brand sure it is plugged into your calculator. Enable evolution mode and obtain the IP address as desribed in the emulator department above. You will as well need to obtain the Pivot from the the Settings awarding under About → Hardware:

Run the target command-line utility to acquaintance a name with an IP address, device countersign and PIN.

  • On Windows:

                                      $ platforms\blackberry10\cordova\target.bat add mydevice 169.254.0.1 -t device --password 123456 --pin FFFF972E                              
  • On Mac/Linux:

                                      $ platforms/blackberry10/cordova/target add together mydevice 169.254.0.1 -t device --password 123456 --pivot FFFF972E                              

where:

  • --password refers to the password to unlock the device.

  • --pin refers to the device Pin obtained from the Settings application.

Then, run the run command to view the app:

                          $ cordova run blackberry10                      

If a debug token is not yet set upwards for the device, an error bulletin prompts you to use the platform run script with the password y'all provided when registering for signing keys.

  • On Windows:

                                      $ platforms\blackberry10\cordova\run.bat --device --keystorepass mysecret                              
  • On Mac/Linux:

                                      $ platforms/blackberry10/cordova/run --device --keystorepass mysecret                              

Debugging with WebInspector

When debugging on the device or an emulator, you may run WebInspector remotely to view the application's internal country. A prompt displays the URL that allows you to connect to the app with a standard web browser. For more information, see Debugging using WebInspector.

Building a Release Version

By default, running the cordova build command creates an unsigned .bar package file suitable for testing on a device or simulator.

Apply --release to create a release version suitable for distribution through BlackBerry World.

            $ cordova build --release --keystorepass <signing countersign>                      

The --keystorepass selection specifies the countersign you divers when configuring your computer to sign applications.

Deploy to Other Locations

The instructions to a higher place assume a device is plugged in via USB or a simulator is running on the local auto. It is also possible to deploy to other locations.

An additional set of control-line utilities are included when you set the BlackBerry x platform for your projection. The following control, in this example invoked from the projection elevation-level directory, associates a target named emu with an IP accost.

  • On Windows:

                                      $ platforms\blackberry10\cordova\build.bat --release --keystorepass mysecret                              
  • On Mac/Linux:

                                      $ platforms/blackberry10/cordova/build --release --keystorepass mysecret                              

One time the target is defined, you lot can provide information technology to the run control using --target:

            $ cordova run blackberry10 --target=emu                      

Source: https://cordova.apache.org/docs/en/3.5.0/guide/platforms/blackberry10/

0 Response to "How To Develop Blackberry 10 Apps"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel