Setup-for-BlackBerry10-development: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
(format)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=Setup for BlackBerry10 development=


This page outlines the preferred procedure of setting up your environment for BlackBerry10 development. The [https://developer.blackberry.com/native/ BlackBerry Native Development Kit] ''[developer.blackberry.com]'' (<span class="caps">BBNDK</span>) includes the necessary resources for application development, testing and deployment. It comes bundled with the Momentics Integrated Development Environment (<span class="caps">IDE</span>) which makes both the set up process and the development of native applications as easy as possible.


==Initial Preparation==
[[Category:BlackBerry]]


===Get a BlackBerry ID===


The BlackBerry ID is used as an identity reference and is necessary to register as a developer and use the device in developer mode. You can [http://blackberryid.blackberry.com/ create a BlackBerry ID online] ''[blackberryid.blackberry.com]''. If you already use a BlackBerry device, you should already have a BlackBerry ID, it is the same ID you use in <span class="caps">BBM</span> or to download apps from BlackBerry World. If you have such an ID you can use it to get a BlackBerry ID token for development.


===Get the Momentics <span class="caps">IDE</span>===


First [https://developer.blackberry.com/native/downloads/ download for the Momentics <span class="caps">IDE</span>] ''[developer.blackberry.com]'', set it up and download an <span class="caps">NDK</span> with appropriate <span class="caps">API</span> level, see this [https://developer.blackberry.com/native/documentation/cascades/getting_started/setting_up.html article] ''[developer.blackberry.com]'' for more details. Some of the future versions of Qt Creator will support these steps as well.
This page outlines the preferred procedure of setting up your environment for BlackBerry10 development. The [https://developer.blackberry.com/native/ BlackBerry Native Development Kit] (BBNDK) includes the necessary resources for application development, testing and deployment. It comes bundled with the Momentics Integrated Development Environment (IDE) which makes both the set up process and the development of native applications as easy as possible.


==Setup==
== Initial Preparation ==


===Enable the development mode on the device.===
=== Get a BlackBerry ID ===


Make sure your device is connected to your computer. Switch on Development Mode in ''Settings -&gt; Security and Privacy -&gt; Development Mode'' .
The BlackBerry ID is used as an identity reference and is necessary to register as a developer and use the device in developer mode. You can [http://blackberryid.blackberry.com/ create a BlackBerry ID online]. If you already use a BlackBerry device, you should already have a BlackBerry ID, it is the same ID you use in BBM or to download apps from BlackBerry World. If you have such an ID you can use it to get a BlackBerry ID token for development.


===Download <span class="caps">NDK</span> and setup===
=== Get the Momentics IDE ===


Install the Momentics <span class="caps">IDE</span> by executing
First [https://developer.blackberry.com/native/downloads/ download for the Momentics IDE], set it up and download an NDK with appropriate API level, see this [https://developer.blackberry.com/native/documentation/cascades/getting_started/setting_up.html article] for more details. Some of the future versions of Qt Creator will support these steps as well.


Install the <span class="caps">API</span> Level matching your device. Other <span class="caps">API</span> Levels can be added [http://developer.blackberry.com/native/documentation/core/com.qnx.doc.ide.userguide/topic/update_ndk_ide.html later] ''[developer.blackberry.com]''.
== Setup ==
 
=== Enable the development mode on the device. ===
 
Make sure your device is connected to your computer. Switch on Development Mode in ''Settings -> Security and Privacy-> Development Mode'' .
 
=== Download NDK (s) and setup ===
 
Install the Momentics IDE by executing
 
<code>
cd ~/Downloads/
chmod +x momentics-<your-version>.bin
./momentics-<your-version>.bin
</code>
 
Install the API Level matching your device. Other API Levels can be added [[http://developer.blackberry.com/native/documentation/core/com.qnx.doc.ide.userguide/topic/update_ndk_ide.html later]].


Select ''Manage Devices'' from the ''Devices'' drop-down menu. Create and Download the BlackBerry ID token needed for deployment and testing. Enter your company name and choose a password. Log in with your Black Berry ID and password in the pop-up window. Click ''Next'' and ''Finish'' to generate a debug token and deploy it to your device.
Select ''Manage Devices'' from the ''Devices'' drop-down menu. Create and Download the BlackBerry ID token needed for deployment and testing. Enter your company name and choose a password. Log in with your Black Berry ID and password in the pop-up window. Click ''Next'' and ''Finish'' to generate a debug token and deploy it to your device.
Line 29: Line 40:
Qt Creator 3.0 and later support the BlackBerry ID token and debug token management as well.
Qt Creator 3.0 and later support the BlackBerry ID token and debug token management as well.


==Verify your setup with a sample app==
== Verify your setup with a sample app ==


===In the Momentics <span class="caps">IDE</span>===
=== In the Momentics IDE ===


Select a sample application in the Momentics <span class="caps">IDE</span> and click ''Download and Import''. This will download the sample and create a new project. Hit the green play button in Momentics to run the application on your BlackBerry 10 device. The application will now start on your BlackBerry 10 device.
Select a sample application in the Momentics IDE and click ''Download and Import''. This will download the sample and create a new project. Hit the green play button in Momentics to run the application on your BlackBerry 10 device. The application will now start on your BlackBerry 10 device.


''Done! <span class="smiley">:-)</span> You have successfully set up your development environment.''
''Done! :-) You have successfully set up your development environment.''


===In Qt Creator===
=== In Qt Creator ===


See the article [[Qt-Creator-with-BlackBerry-10|Qt Creator with BlackBerry 10]]. Qt Creator 2.7 and later contain a plug-in which integrates the BlackBerry 10 <span class="caps">NDK</span> and its tools into the development process as it is know known to Qt Creator users. This integration is under continuous development. Qt Creator 3.0 introduced many news features and the 3.1 version will bring more.
See the article [[Qt-Creator-with-BlackBerry-10]]. Qt Creator 2.7 and later contain a plug-in which integrates the BlackBerry 10 NDK and its tools into the development process as it is know known to Qt Creator users. This integration is under continuous development. Qt Creator 3.0 introduced many news features and the 3.1 version will bring more.


==Simulator==
== Simulator ==


You can download the Simulator from the Momentics <span class="caps">IDE</span> via the ''Devices'' menu. Select Manage devices from the main toolbar in Momentics and switch to the Simulator tab. The Simulator is available as separate download. For more details, see the [https://developer.blackberry.com/devzone/develop/simulator/ this article on the developer page] ''[developer.blackberry.com]''. Installing the Simulator is optional. You most probably will test and deploy applications on a BlackBerry10 device directly, but sometimes using the Simulator is more convenient. It also allows testing of your app on a configuration of a device which you do not have.
You can download the Simulator from the Momentics IDE via the ''Devices'' menu. Select Manage devices from the main toolbar in Momentics and switch to the Simulator tab. The Simulator is available as separate download. For more details, see the [https://developer.blackberry.com/devzone/develop/simulator/ this article on the developer page]. Installing the Simulator is optional. You most probably will test and deploy applications on a BlackBerry10 device directly, but sometimes using the Simulator is more convenient. It also allows testing of your app on a configuration of a device which you do not have.


If you work on command line and use Qt 5.2 or later you have to set new value to the <code><span class="caps">CPUVARDIR</span><code> environment variable to switch to Simulator as target:</code></code>
If you work on command line and use Qt 5.2 or later you have to set new value to the CPUVARDIR environment variable to switch to Simulator as target:
 
<code>
export CPUVARDIR=x86
</code>


Going back to the device target:
Going back to the device target:


Certainly you have to re-run <code>qmake<code> each time you change <code><span class="caps">CPUVARDIR</span><code>.</code></code></code></code>
<code>
export CPUVARDIR=armle-v7
</code>


Prior Qt 5.2 and on Qt4, you have to explicitly specify specs when calling <code>qmake<code> to force generation of make files for the Simulator target:</code></code>
Certainly you have to re-run '''qmake''' each time you change '''CPUVARDIR'''.


Note: You need to have VMware Player installed on your machine to run BlackBerry 10 Simulator.
Prior Qt 5.2 and on Qt4, you have to explicitly specify specs when calling '''qmake''' to force generation of make files for the Simulator target:


==Qt5==
<code>
qmake -spec blackberry-x86-qcc
</code>


Qt5 is not fully supported on BlackBerry 10 yet, i.e. it is neither included in the <span class="caps">NDK</span>, nor in the firmware for devices on the market. Qt5 for BlackBerry 10 is under development and will be fully integrated some time in the near future. Nevertheless, Qt5 on BlackBerry 10 has reached production quality and can be used for regular application development and publishing to [http://appworld.BlackBerry.com/ BlackBerry AppWorld] ''[appworld.BlackBerry.com]''. You just have include the Qt5 runtime in the application package. See the article [[Qt5-on-BlackBerry10|Qt5 on BlackBerry10]] for more details.
Note: You need to have VMware Player installed on your machine to run BlackBerry 10 Simulator.
 
===Categories:===


* [[:Category:BlackBerry|BlackBerry]]
== Qt5 ==

Latest revision as of 08:07, 27 March 2015



This page outlines the preferred procedure of setting up your environment for BlackBerry10 development. The BlackBerry Native Development Kit (BBNDK) includes the necessary resources for application development, testing and deployment. It comes bundled with the Momentics Integrated Development Environment (IDE) which makes both the set up process and the development of native applications as easy as possible.

Initial Preparation

Get a BlackBerry ID

The BlackBerry ID is used as an identity reference and is necessary to register as a developer and use the device in developer mode. You can create a BlackBerry ID online. If you already use a BlackBerry device, you should already have a BlackBerry ID, it is the same ID you use in BBM or to download apps from BlackBerry World. If you have such an ID you can use it to get a BlackBerry ID token for development.

Get the Momentics IDE

First download for the Momentics IDE, set it up and download an NDK with appropriate API level, see this article for more details. Some of the future versions of Qt Creator will support these steps as well.

Setup

Enable the development mode on the device.

Make sure your device is connected to your computer. Switch on Development Mode in Settings -> Security and Privacy-> Development Mode .

Download NDK (s) and setup

Install the Momentics IDE by executing

cd ~/Downloads/
chmod +x momentics-<your-version>.bin
./momentics-<your-version>.bin

Install the API Level matching your device. Other API Levels can be added [later].

Select Manage Devices from the Devices drop-down menu. Create and Download the BlackBerry ID token needed for deployment and testing. Enter your company name and choose a password. Log in with your Black Berry ID and password in the pop-up window. Click Next and Finish to generate a debug token and deploy it to your device.

Qt Creator 3.0 and later support the BlackBerry ID token and debug token management as well.

Verify your setup with a sample app

In the Momentics IDE

Select a sample application in the Momentics IDE and click Download and Import. This will download the sample and create a new project. Hit the green play button in Momentics to run the application on your BlackBerry 10 device. The application will now start on your BlackBerry 10 device.

Done! :-) You have successfully set up your development environment.

In Qt Creator

See the article Qt-Creator-with-BlackBerry-10. Qt Creator 2.7 and later contain a plug-in which integrates the BlackBerry 10 NDK and its tools into the development process as it is know known to Qt Creator users. This integration is under continuous development. Qt Creator 3.0 introduced many news features and the 3.1 version will bring more.

Simulator

You can download the Simulator from the Momentics IDE via the Devices menu. Select Manage devices from the main toolbar in Momentics and switch to the Simulator tab. The Simulator is available as separate download. For more details, see the this article on the developer page. Installing the Simulator is optional. You most probably will test and deploy applications on a BlackBerry10 device directly, but sometimes using the Simulator is more convenient. It also allows testing of your app on a configuration of a device which you do not have.

If you work on command line and use Qt 5.2 or later you have to set new value to the CPUVARDIR environment variable to switch to Simulator as target:

export CPUVARDIR=x86

Going back to the device target:

export CPUVARDIR=armle-v7

Certainly you have to re-run qmake each time you change CPUVARDIR.

Prior Qt 5.2 and on Qt4, you have to explicitly specify specs when calling qmake to force generation of make files for the Simulator target:

qmake -spec blackberry-x86-qcc

Note: You need to have VMware Player installed on your machine to run BlackBerry 10 Simulator.

Qt5