This section describes how to build an application for a Symbian target and deploy it to a Symbian phone. To enable convenient deployment and debugging of the application onto a Symbian phone, you need to install a debugging application on the phone and you may also need to install the Qt package.
Debugging is only supported on the Windows operating system (32- and 64-bit versions). In addition to a compatible version of Windows, you need the following:
- Symbian phone with a USB cable.
- Qt SDK.
- Nokia Suite.
Set up the Symbian phone
Connect the Symbian phone to the PC using the USB cable delivered with your phone. If you haven't previously used the phone with Nokia Suite, all the drivers required are installed automatically when you make the first connection: installation takes approximately one minute.
Install Qt on the phone
You do not need to complete this step for Symbian Belle phones, as they have Qt installed in their firmware.
For any other Symbian phone, you need a program (such as Nokia Suite) that can install *.sis files. To install Qt, use the shortcut that the Qt SDK created in the Start Menu (Start Menu > All Programs > Qt SDK > Symbian Anna Qt 4.7.4 > Install Qt 4.7.4 for Symbian Anna on device) and follow the steps shown on your screen.
As an alternative, use Windows Explorer to find the Qt installation package by navigating to
Note: If Nokia Suite has problems installing the
*.sis files, you can either copy the
*.sis file from your computer to the phone in USB storage mode or send the file via a Bluetooth connection. Then install the file
on the phone using, for example, the file manager application.
Install CODA on-device debugging agent on the phone
Use the shortcut in the Start Menu to install the CODA on-device debugging agent (StartMenu > All Programs > Qt SDK > Symbian Anna Qt 4.7.4 > Install CODA (Debug Agent) on Symbian Anna device).
As an alternative, you can navigate to
<QtSDK_install_path>\Symbian\sis\common\CODA and install the .sis file using Nokia Suite or by copying it to the phone.
Set up Qt Creator
Now that you have installed the CODA application on the phone, check the Symbian Build and Run settings in Qt Creator. Use the left-hand toolbar to go to the Projects view. Then go to the Symbian Device tab and open the Build tab (see Figure 18).
Note: If you didn't add a Symbian target in the project creation phase in Step 2, the Symbian Device tab will not be visible. To add the target now, click '+' and select Symbian in the drop-down menu.
Make sure that you have selected Debug in the 'Edit build configuration' drop-down menu.
The Qt Version drop-down menu should display Qt 4.7.4 for Symbian Anna (Qt SDK). If it doesn't, click Manage to change the selection.
Make sure that the project you created in Step 2 is active and then click Run under the Symbian Device tab. Also confirm that the phone is connected to the PC with the USB cable and the device on Serial port drop-down menu displays the COM port (see Figure 19).
Symbian platform security mandates the signing of applications. Most of the applications (such as the template application used here) can be self-signed. The Qt SDK automatically self-signs the application installation packages with a default certificate and key pair (shown in Figure 19).
If an application needs sensitive capabilities, such as reading phone data, it has to be signed with your own Publisher ID, which verifies the identity of the application's vendor. In general, this is needed for commercially released applications but also for such applications undergoing development and testing. The custom certificate can be used for a project by clicking the Details button for Create SIS Package and adding the certificate and key files. If you are new to platform security, read more about the fundamentals and implications for application signing in Nokia Developer Wiki's Platform Security article.
You have now completed all the configuration of the build and your phones, so debugging is now enabled whenever you have your phone is connected to your PC.
Figure 20: Whenever the phone is connected to the PC, this notification appears to confirm that debugging is enabled.
Note: If debugging was not enabled automatically, launch the CODA application from the RnD Tools folder in the application menu of your Symbian phone and use Settings to configure the connection. You can also define whether you want to enable debugging automatically on connect (USB Plug and Play).
Build the application for the Symbian Debug target
Select 'Symbian Device' as a target in the left-hand toolbar (see Figure 21). Make sure that Debug is selected in Build and that the correct project is active.
To build all open projects, click the hammer icon in the bottom left-hand corner or use the CTRL+SHIFT+B keyboard shortcut.
To build the active project only, use CTRL+B. You can follow the build progress under the Compile Output tab and will see
that a self-signed *.sis file has been created automatically. Once the build and the installation package are ready, the text
'The process "
<QtSDK_install_path>\...\epoc32\tools\make.exe" exited normally' appears.
Note: You can create the Release build of the application in a similar fashion.
Deploy and run the application on the phone
You are now ready to deploy and run the application on the phone. Click the green Run button or use the CTRL+R shortcut.
Optional: To add breakpoints and examine the code line by line, click the Debug button instead. See Qt Creator Help for more information on how to add breakpoints in Qt Creator.
Under the Application Output tab, you can see that the installation file has been deployed and installed on the phone and the application has started.
Figure 22: The application is running on the phone.
Note: The build SIS package can be now located in the root folder of the project.
Now you have successfully deployed the application to the Symbian phone. In the next step, you will deploy a similar application to Nokia N9. Finally, you can find out more about Qt application development by examining useful documentation, code, and learning resources.