Develop and Configure

Version added 07-Mar-2018| Modified 24-Jun-2018

To create a built-in web app, you must define the source code and the required configuration files.

For easier understanding, the process to create built-in web apps is explained using the example of a web app named "" that responds with the string "Hello, Web Application!!".

The directory structure of must be as follows:
├── CMakeLists.txt
├── appinfo.json
├── icon.png
├── index.html
└── webOSjs-0.1.0
    ├── LICENSE-2.0.txt
    └── webOS.js


Setup Development Environment

Before starting development, you must do the following:

  1. Clone the build-webos repository.

    $ git clone
  2. Install all required components (on Ubuntu).

    $ sudo scripts/
  3. Configure the build.

    $ ./mcf -p 0 -b 0 raspberrypi3
  4. Build the webOS image.

    $ source oe-init-build-env  
    $ bitbake webos-image 

This is only a list of the main steps. For detailed information, see Building webOS OSE and Flashing webOS OSE.


Develop the Web App

Web app development can be done using standard web technology. 

If you want to use a webOS service in the web app, follow the steps described in the "Calling webOS Services in Web Apps" section in Web App Overview.

For the sample web app (, you can create the index.html  file in the root web app folder.

<!DOCTYPE html>
<style type="text/css">
body {
                width: 100%;
                height: 100%;
                background-color: #202020;
div {
                display: table;
h1 {
            display: table-cell;
                vertical-align: middle;
                color: #FFFFFF;
                <h1>Hello, Web Application!!</h1>



Apps are required to have metadata before they can be packaged. This metadata is stored in a file that is used by the webOS device to identify the app, its icon, and other information that is needed to launch the app. For the sample web app (, you must:

  • Create and update the file : appinfo.json

  • Directory :

  "id": "",
  "version": "0.0.1",
  "vendor": "My Company",
  "type": "web",
  "main": "index.html",
  "title": "Web app sample",
  "icon": "icon.png"

A brief explanation of the above file:

  • Line(2) : The ID for the app.

  • Line(5) : The type of web app.

  • Line(7) : The title to be shown on the Launcher on the target device.

  • Line(8) : The icon to be shown on the Launcher on the target device. Make sure the icon file is available in the root directory. You can use your own icon.png (80*80) file or attached icon.png.

For more details, see appinfo.json.

This file provides general information of the web app. For the sample web app (, you must:

  • Create and update the file :

  • Directory : 

Non-availability of the file can result in an error at build time.
Make sure the 'Summary' subsection is a single line. Even a blankspace before the 'Description' section is considered a part of the summary and can cause the build to fail. 
Here is a snippet of the file that shows the blankspace that can cause the error:

web app sample
(no blankspace)

Sample File

web app sample


web app sample

How to Build on Linux

## Dependencies

Below are the tools and libraries (and their minimum versions) required to build sample program:

* cmake (version required by cmake-modules-webos)
* gcc
* glib-2.0
* make
* cmake-modules-webos
## Building
    $ cd build-webos
    $ source oe-init-build-env
    $ bitbake
Copyright and License Information
Unless otherwise specified, all content, including all source code files and
documentation files in this repository are:
Copyright (c) 2018 LG Electronics, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.
SPDX-License-Identifier: Apache-2.0



This file is required to generate the standard build files. For the sample web app (, you must:

  • Create and update the file : CMakeLists.txt

  • Directory :

cmake_minimum_required(VERSION 2.8.7)
project( NONE)
webos_modules_init(1 0 0 QUALIFIER RC4)
#install necessary files to destination directory
        PATTERN "*~" EXCLUDE
        PATTERN "CMake*" EXCLUDE
        PATTERN "build*" EXCLUDE
        PATTERN "oe-*" EXCLUDE
        PATTERN "*.lock" EXCLUDE)

A brief explanation of the above file:

  • Line(2) : Specify the project name and the file extension type. In this tutorial, we use "" as the project name for indicating various filenames and pathnames. The file extension type allows CMake to skip unnecessary compiler checks.

  • Line(3) : Include webOS OSE modules for the build.

  • Line(4) : Specify the "cmake-modules-webos" version.

  • Line(6) : The built-in app must have source codes, appinfo.json, icon files for each application name in /usr/palm/applications/ on target. To install the files to target, set /usr/palm/applications/ as the path.

  • Line(8~14) : Install the required files to /usr/palm/applications/ on target. Exclude the files that do not have to be installed to target device. 

Except as noted, this content is licensed under Creative Commons Attribution 4.0 and sample code is licensed under Apache License 2.0.