External QML apps are 3rd party QML apps that must be installed on the webOS target device. External QML apps can be created and deployed using the Command-Line Interface (CLI) tool that are provided by the webOS Open Source Edition (OSE) SDK.
This page describes the steps to develop an external QML app using CLI. For detailed information on the commands used in this tutorial, see CLI commands.
Developing an external QML app requires the following steps:
The QML app directory (sampleApp) has the following files:
Configuration file that includes metadata for the QML app.
The icon image file. Can be replaced with a relevant icon.
QML application main page. This page only shows "Hello, QML Application!!" text on the screen.
If you already have an existing QML app that you want to deploy on a webOS OSE device, you must add the appinfo.json file to the app root directory. To create this file, enter the following CLI command:
$ ares-generate -t qmlappinfo sampleApp
Step 2: Implement the QML App
Design and implement the source code for the QML app.
By default, the basic QML app template includes some basic code that prints a “Hello, QML Application!!” message. Therefore, if you want to create a demo QML app to test this process, you can skip this step and proceed.
Note If you are packaging a JS service within the QML app and the JS service uses methods of external services, you must add the group information of the external methods used by the JS service to the requiredPermissions field in appinfo.json.
Step 4: Package the QML App
After implementing and configuring the QML app, it must be packaged as an IPK file. Make sure the appinfo.json file is available, because it is required when packaging a QML app for webOS OSE.
To package the QML app, use the ares-package command. The packaged file is generated in the current directory.
$ ares-package sampleApp
In the above command, sampleApp is the QML app directory. You can use an absolute or relative path. Also you can package the app with a service. For more details on using ares-package, see ares-package.
Step 5: Install the QML App
Before installing the app, ensure that the webOS OSE target device is registered on the CLI using the ares-setup-device command. For details, see ares-setup-device.
Make sure that the target device is running during the installation.
To install the QML app on the target device, execute the following command: