Update README.md for BlackBerry 10
Project: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/commit/b707831f Tree: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/tree/b707831f Diff: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/diff/b707831f Branch: refs/heads/master Commit: b707831f7c62ea053614645f44f8a660e40234e7 Parents: 2862189 Author: Bryan Higgins <[email protected]> Authored: Thu Apr 25 09:59:11 2013 -0400 Committer: Bryan Higgins <[email protected]> Committed: Fri May 3 10:13:32 2013 -0400 ---------------------------------------------------------------------- README.md | 5 ++- blackberry10/README.md | 97 +++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 97 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/b707831f/README.md ---------------------------------------------------------------------- diff --git a/README.md b/README.md index 8aaf204..3e2dbf1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,10 @@ -Cordova BlackBerry +# Apache Cordova for BlackBerry +=== This repo contains cordova projects for the BlackBerry platforms: blackberry - BBOS 5+ and Tablet OS blackberry10 - BB10 + +Please see README files in the sub folders for more information. http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/b707831f/blackberry10/README.md ---------------------------------------------------------------------- diff --git a/blackberry10/README.md b/blackberry10/README.md index 8aaf204..a19b87a 100644 --- a/blackberry10/README.md +++ b/blackberry10/README.md @@ -1,7 +1,96 @@ -Cordova BlackBerry +# Apache Cordova for BlackBerry 10 -This repo contains cordova projects for the BlackBerry platforms: +Apache Cordova is an application development platform which allows mobile applications to be written with web technology: HTML, CSS and JavaScript. Access to device APIs is provided by native plugins. -blackberry - BBOS 5+ and Tablet OS +This implementation for BlackBerry 10 packages web assets into a BAR file which may be deployed to devices and simulators. + +## Pre-requisites + +Install the latest BlackBerry 10 NDK: + +[https://developer.blackberry.com/native/download/](https://developer.blackberry.com/native/download) + +Setup environment variables: +- [Linux/Mac] `source [BBNDK directory]/bbndk-env.sh` +- [Windows] `[BBNDK directory]\bbndk-env.bat` + +Install code signing keys: + +[https://developer.blackberry.com/html5/documentation/signing_setup_bb10_apps_2008396_11.html](https://developer.blackberry.com/html5/documentation/signing_setup_bb10_apps_2008396_11.html) + +Install node.js: + +[http://nodejs.org/](http://nodejs.org/) + +## Getting Started + +Create a new project: + +`bin/create <path to project>` + +## Managing Targets + +A target is a device or simulator which will run the app. + +This command will add a new target: + +`<path to project>/cordova/target add <name> <ip> <device | simulator> [-p | --password <password>] [--pin <devicepin>]` + +To remove a target: + +`<path to project>/cordova/target remove <name>` + +To set a target as default: + +`<path to project>/cordova/target default <name>` + +## Building + +`<path to project>/cordova/build` + +A project can be built in debug or release mode. + +To run an application in debug mode, a debug token must first be installed on the device. The build script will automatically attempt to generate a token and install it. This requires code signing keys to be installed on the development machine. Debug mode will also enable WebInspector. A prompt will appear with the URL to access WebInspector from a remote machine. + +If building in release mode, a unique buildId must be provided, either via command line or by setting it in config.xml. + +Here is the build script syntax: + +`build command [<target>] [-k | --keystorepass] [-b | --buildId <number>] [-p | --params <json>] [-ll | --loglevel <level>]` + +Commands: + + release [options] + Build in release mode. This will sign the resulting bar. + + debug [options] + Build in debug mode. + + Options: + + -h, --help output usage information + -k, --keystorepass <password> Signing key password + -b, --buildId <num> Specifies the build number for signing (typically incremented from previous signing). + -p, --params <params JSON file> Specifies additional parameters to pass to downstream tools. + -ll, --loglevel <loglevel> set the logging level (error, warn, verbose)` + +## Deploying + +To deploy the project to a target, use the run command: + +`<path to project>/cordova/run <target>` + +## Plugin Management + +To add a plugin from a local path, you will first need to run fetch: + +`<path to project>/cordova/plugin fetch <path to plugin>` + +Now the plugin can be installed by name: + +`<path to project>/cordova/plugin install <name>` + +Plugins hosted remotely can be installed by name without using fetch. To see a list of available remote plugins use: + +`<path to project>/cordova/plugin list` -blackberry10 - BB10
