appinfo.json

Apps are required to have metadata before they can be packaged. This metadata is stored in a file called appinfo.json. The file is used by the webOS device to identify the app, its icon, and other information that is needed to launch the app. This file is located in the app's root directory and contains a single JSON object.

If the app is localized into more than one language, each language can have its own appinfo.json file. However, the app ID and version number in each localized appinfo.json must be the same as those in the top-level appinfo.json. The app ID and version in the top-level appinfo.json are validated for correct value and structure. Any app that fails the validation cannot be packaged or uploaded.

Here are little tips that might help you with JSON syntax:

  • Do not include any comments (/* or //) in JSON files.

  • Use double quotes around the properties--no single quotes.

Localizing App Metadata

According to the locale setting value, the app metadata localization shows the matching app information at the Home Launcher. 

To provide app information in a specific locale, you need to create locale folders under the resources folder, then appinfo.json files for each locale under correct locations as shown below:

The locale consists of Language, Script, and Country/Region information. (e.g. ko-KR, mn-Cy-MN)

With additional appinfo.json files, your app title and description can be provided in various languages. All other properties will be kept the same as the default appinfo.json file in the root of the project.

{
    "title": "Translated app title"
    "appDescription": "Translated app description",
}
  • In the appinfo.json file for localization, only appDescription and title properties can be filled.

  • If you need to use non-Latin letters (non-ASCII) in the appinfo.json file, the file needs to be saved in UTF-8 without BOM format.

When the locale value is changed after adding an appinfo.json file corresponding to the locale information, the appinfo.json file in the app root directory is loaded into the system memory of the webOS device. Then the other appinfo.json files are overridden depending on the locale setting.

appinfo.json Reference

Schema

{
    "id"               : string,
    "title"            : string,
    "main"             : string,
    "icon"             : string,
    "largeIcon"        : string,
    "type"             : string,
    "vendor"           : string,
    "version"          : string,
    "appDescription"   : string,
    "resolution"       : string,
    "iconColor"        : string,
    "splashBackground" : string,
    "transparent"      : boolean, 
    "requiredMemory"   : number
}

Properties

Property

Required

Type

Description

id

Required

string

App ID, e.g. "com.newco.app.myapp". Every app has a unique ID, formed from reverse DNS naming conventions. Home Launcher uses the ID to uniquely identify your application and displays it with the title. The application ID is unique, set once, and cannot be changed after publishing the application.

  • Start the ID with the reverse domain of company/institution. (Recommended)

  • For app developers, the ID cannot start with the following reverse domain names: com.palm, com.webos, com.lge, com.palmdts. We recommend that platform developers who implement built-in apps and services can only use those names.

  • Finish the ID with subdomain app.app-name. (Recommended)

  • The ID must consist only of lowercase letters (a-z), digits (0-9), minus signs, and periods. It must be at least two characters long and must start with an alphanumeric character.

title

Required

string

The title of the app as shown in Home Launcher and the app window. The app title is unique; once set, it cannot be changed after publishing the app.

main

Required

string

The launch point for the app. The file path must be relative to the appinfo.json file and needs to point to an HTML file. The default is "index.html".

icon

Required

string

Image displayed for your app. The icon should be in PNG format. The file path must be relative to the appinfo.json file.

  • Default Value: "icon.png"

largeIcon

Required

string

Large app icon. The icon should be in PNG format. 

type

Required

string

App type. Only "web" is allowed.

vendor

Required

string

Provides the information of the app owner. This is used in Home Launcher and deviceinfo dialogs.

version

Required

string

The app version number, comprised of three non-negative integers in the format. DO NOT contain leading zeroes.

The major, minor, and revision numbers are all mandatory; otherwise, the app may not be installed. The major, minor, and revision numbers are discrete. For example, 1.5.3 is a lower version than 1.15.3.

..
e.g. "2.1.0" (not "2.1")
  • Default value: "1.0.0"

appDescription

Optional

string

The appDescription provides brief information of the app. Think of this as a short tagline for the app. The appDescription cannot exceed 60 characters.

resolution

Optional

string

The screen resolution of the app. webOS Open Source Edition (OSE) supports following resolutions:

  • "1920x1080": FHD resolution (Default value)

  • "1280x720": HD resolution

webOS OSE does not support UHD resolution for web apps.

iconColor

Optional

string

Indicates the background color for the app tile. 

  • Default value: white

splashBackground

Required

string

Path for a background image to be shown while the app is loading. The file path must be relative to the appinfo.json file. The file should be in PNG format and the image size should be 1920 x 1080.

transparent

Optional

boolean

App background overlays system background. If you did not set the background color or background image, system background (black color) will be displayed. This property configures the transparency of the app background. If set to true, the system background will be displayed clearly. If set to false, the transparency rate of app background will be decreased and the system background will be shown as little grey color.

  • Default value: false

requiredMemory

Optional

number

The requiredMemory indicates the minimum amount of memory in megabytes required to run the app.

Example

{
	"id": "com.myco.app.appname",
	"title": "AppName",
	"main": "index.html",
	"icon": "AppName_80x80.png",
	"largeIcon": "AppName_130x130.png",
	"type": "web",
	"vendor": "My Company",
	"version": "1.0.0",
	"appDescription": "This is an app tagline",
	"resolution": "1920x1080",
	"iconColor": "red",
	"splashBackground": "AppName_Splash.png"
	"transparent": false, 
	"requiredMemory": 20
}
Except as noted, this content is licensed under Creative Commons Attribution 4.0 and sample code is licensed under Apache License 2.0.