You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by mw...@apache.org on 2013/07/16 22:54:49 UTC

[2/4] docs commit: [CB-3822] BB10 platform guide update.

[CB-3822] BB10 platform guide update.

Still need:

- hello-world screen
- clarify if commented release/debug 'build' info is still necessary


Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/72966e94
Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/72966e94
Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/72966e94

Branch: refs/heads/master
Commit: 72966e94ac727af2ac63d648e61f1274e25b73ea
Parents: e99ea81
Author: Mike Sierra <le...@gmail.com>
Authored: Fri Jul 12 12:07:00 2013 -0400
Committer: Michael Brooks <mi...@michaelbrooks.ca>
Committed: Tue Jul 16 13:54:26 2013 -0700

----------------------------------------------------------------------
 .../edge/guide/platforms/blackberry10/index.md  | 100 +++++++++++++------
 .../guide/platforms/blackberry10/bb_devel.png   | Bin 0 -> 59777 bytes
 .../guide/platforms/blackberry10/bb_home.png    | Bin 0 -> 342061 bytes
 3 files changed, 67 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/72966e94/docs/en/edge/guide/platforms/blackberry10/index.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/guide/platforms/blackberry10/index.md b/docs/en/edge/guide/platforms/blackberry10/index.md
index 312feca..694a151 100644
--- a/docs/en/edge/guide/platforms/blackberry10/index.md
+++ b/docs/en/edge/guide/platforms/blackberry10/index.md
@@ -21,6 +21,10 @@ command-line tools, described in BlackBerry Platform Guide.
 
 The BlackBerry 10 Native SDK is available from
 [developer.blackberry.com](http://developer.blackberry.com/native/download/).
+If you wish to run a device emulator, it is available on the same
+page. The device image is bundled with a _controller_ application that
+modifies hardware status, such as location and battery strength.
+(On Mac, the emulator runs as a VMware Fusion image.)
 
 Along with the SDK, you also need to register for a code signing key
 and debug token.  The signing key allows you to distribute apps
@@ -28,7 +32,10 @@ through BlackBerry World. The debug token allows you to test unsigned
 apps on a BlackBerry 10 emulator or device. You do not need to create
 and install the debug token yourself; if you supply the keystore
 password, the build script creates and installs the debug token for
-you. For more information:
+you.  To set up the signing key, go to the Blackberry website to
+obtain it, making sure to retain the password you specify. Then run
+the `blackberry-signer` utility that is included with the SDK. Consult
+the following for more information:
 
 * [Register for your code signing key.](https://www.blackberry.com/SignedKeys/codesigning.html)
 
@@ -36,6 +43,8 @@ you. For more information:
 
 * [Learn more about debug tokens.](http://developer.blackberry.com/html5/documentation/running_your_bb10_app_2008471_11.html)
 
+* [Comprehensive guide to setting up your SDK environment.](http://developer.blackberry.com/native/documentation/bb10/com.qnx.doc.native_sdk.quickstart/topic/set_up_your_environment.html)
+
 ## Create a Project
 
 Use the `cordova` utility to set up a new project, as described in The
@@ -49,27 +58,54 @@ directory:
 
 ## Deploy to Emulator
 
-To test an app either on an emulator or a device, you need to add a
-_target_ to your project. Each is identified with a unique name, and
-associated with an IP address.  The following associates a target
-named _simu_ with _0.0.0.0_. The `-t` option specifies the `simulator`
-target _type_:
+Before testing an app on either on an emulator or a device, you need
+to add a _target_ to your project. Each is identified with a unique
+name, and associated with an IP address. You need to get the IP
+address from the emulator before you use it to view apps.
+
+Launch the emulator image, then choose __Settings__ from the home
+screen:
+
+![](img/guide/platforms/blackberry10/bb_home.png)
+
+Navigate to the __Security and Privacy &rarr; Development Mode__
+section, enable the option, and obtain the emulator's IP address from
+the screen:
+
+![](img/guide/platforms/blackberry10/bb_devel.png)
+
+An additional set of command-line utilities are included when you set
+up the Blackberry platform for your project.  The following commands,
+in this case invoked from the project's top-level directory,
+associates a target named _emu_ with the IP address displayed above,
+and makes that target the default.  The `add` command's `-t` option
+specifies the `simulator` target _type_, another word for _emulator_:
 
-        $ platforms/blackberry/cordova/target add simu 0.0.0.0 -t simulator
-        $ platforms/blackberry/cordova/target default simu
+        $ platforms/blackberry/cordova/target add emu 169.254.0.1 -t simulator
+        $ platforms/blackberry/cordova/target default emu
+
+Then, run the `emulate` command to view the app:
+
+        $ cordova emulate blackberry
+
+The first time you run the command, you may be prompted for
+information on the intended target, and the keystore password you
+initially set up.
+
+<!-- ![](img/guide/platforms/blackberry10/bb_hello.png) -->
 
 ## Deploy to Device
 
-To deploy to a device, make sure it is plugged into your computer,
-then run a variation of the `target` command such as this:
+To deploy to a device, make sure it is plugged into your computer, and
+obtain the IP address using the same procedure as described above.
+Then run a variation of the `target` command such as this:
 
-        $ platforms/blackberry/cordova/target add dev 0.0.0.0 -t device -p unlockme --pin 123456
+        $ platforms/blackberry/cordova/target add handset 169.254.0.1 -t device -p unlockme --pin 123456
 
 The `--pin` option refers to whatever password you set up when
 requesting a signing key, as described above.  The `-p` option refers
-to whatever local password locks the device itself.
-
-Full `target` syntax follows:
+to whatever local password locks the device itself.  Here is the full
+syntax:
 
         $ cordova/target add <name> <ip-address> [-t <device | simulator>] [-p | --password <password>] [--pin <device-pin>]
 
@@ -80,17 +116,15 @@ where:
 * `<ip-address>` specifies the ip address of the BlackBerry device or
   simulator.
 
-* `-t <device | simulator>` specifies the target type. If not
-  provided, the default value is device.
+* `-t <device | simulator>` specifies the target type.  The default
+  value is `device`.
 
 * `-p|--password <password>` specifies the password for the device or
-  simulator. This is required only if the device or simulator is
-  password protected.
+  simulator, which only applies if either is password-protected.
 
 * `--pin <device-pin>` specifies the PIN of the BlackBerry device,
-  which identifies that device as a valid host for the debug
-  token. This argument is required only if you are creating a debug
-  token.
+  which identifies it as a valid host for the debug token.  This
+  argument is required only if you create a debug token.
 
 To remove a target:
 
@@ -104,20 +138,20 @@ To set a target as the default:
 
 ## Building your app
 
-To build your app, run the build script. You can build the app in
-either release mode or in debug mode.
+To build the app, run the `build` script, either in release or debug
+mode.
 
-* When you build the app in release mode, you are preparing it for
-  distribution through BlackBerry World. The script packages your app
-  resources and plugins together in a _.bar_ file, then signs the app.
+* Building the app in release mode, prepares it for distribution
+  through BlackBerry World. The script packages the app's resources
+  and plugins together in a _.bar_ file, then signs the app.
 
-* When you build the app in debug mode, you are preparing it to be
-  tested. The script packages your app resources and plugins together
-  in a _.bar_ file, but does not sign it. The script can also deploy
-  the app onto a previously defined target. If you have not already
-  created and installed a debug token, you can supply the keystore
-  password, and the build script will create and install the debug
-  token for you as well.
+* Building the app in debug mode prepares it to be tested. The script
+  packages the app's resources and plugins together in a _.bar_ file,
+  but does not sign it. The script can also deploy the app onto a
+  previously defined target. If you have not already created and
+  installed a debug token, you can supply the keystore password, and
+  the build script then create and install the debug token for you as
+  well.
 
 Debug mode also enables Web Inspector for the app, which allows you to
 remotely inspect the source code. A prompt displays the URL that you

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/72966e94/template/docs/default/img/guide/platforms/blackberry10/bb_devel.png
----------------------------------------------------------------------
diff --git a/template/docs/default/img/guide/platforms/blackberry10/bb_devel.png b/template/docs/default/img/guide/platforms/blackberry10/bb_devel.png
new file mode 100644
index 0000000..94de9ec
Binary files /dev/null and b/template/docs/default/img/guide/platforms/blackberry10/bb_devel.png differ

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/72966e94/template/docs/default/img/guide/platforms/blackberry10/bb_home.png
----------------------------------------------------------------------
diff --git a/template/docs/default/img/guide/platforms/blackberry10/bb_home.png b/template/docs/default/img/guide/platforms/blackberry10/bb_home.png
new file mode 100644
index 0000000..c8dae64
Binary files /dev/null and b/template/docs/default/img/guide/platforms/blackberry10/bb_home.png differ