App Metadata

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 TV to identify the app, its icon and other information that is needed to launch and run 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.

LG Content Store Requirements

Developers must specify the following appinfo.json properties when submitting their apps to the LG Content Store (LG Store).

  • id
  • title
  • type
  • main
  • largeIcon

 

See appinfo.json reference section for details of these required properties.

Localizing App Metadata

According to the locale setting value, the app metadata localization shows the matching app information at the launcher and the home screen. 

 

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.son 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 webOS TV. Then the other appinfo.json files are overridden depending on the locale setting.

appinfo.json Reference

Schema

{
	"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",
	"bgColor": "red",
	"iconColor": "red",
	"bgImage": "AppName_Preview.png",
	"splashBackground": "AppName_Splash.png"
	"transparent": false, 
	"handlesRelaunch": false,
    "disableBackHistoryAPI": false,
	"requiredMemory": 20,
	"assets": [
		"resources"
	],
    "enyoVersion": "2.5",    /* This property is used for only Enyo v2.5/v2.3. */
	"onDeviceSource": {      /* This property and sub properties are used for only Enyo v2.5/v2.3. */
		"enyo": "$enyo-framework/2.5/enyo",
		"lib/layout": "$enyo-framework/2.5/lib/layout",
		"lib/moonstone": "$enyo-framework/2.5/lib/moonstone",
		"lib/spotlight": "$enyo-framework/2.5/lib/spotlight",
		"lib/ilib": "$enyo-framework/2.5/lib/enyo-ilib",
		"lib/cordova": "$enyo-framework/2.5/lib/enyo-cordova",
		"lib/enyo-webos": "$enyo-framework/2.5/lib/enyo-webos"
	}
}

Property Descriptions

Property Required Type Description
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.
assets Optional string

A list of files and directories to include into app package. The ares-package will package the specified files and directories such as resources directory that contains asset files. This property is only available when using Enyo template.

bgColor Optional string

The bgColor is the color of the app background in the Launcher. It will be displayed when the bgImage is not provided or unable to display. A color can be specified as a hex value or as a HTML color name.

  • Example: "bgColor":"#5e70a2, "bgColor":"#ffffff"
This property is only available in webOS TV v1.x and v2.0. This property is ignored in webOS TV v3.0
bgImage Optional string

The bgImage is the background image displayed for your app when activated in the Launcher. This file should be in PNG format and the image size must be 1920 x 1080 pixels. The file path must be relative to the appinfo.json file.

  • Example: "image/myappbgimage.png"
This property is only available in webOS TV v1.x and v2.0. This property is ignored in webOS TV v3.0
disableBackHistoryAPI Optional boolean

Set whether an app can receive a back key event when the back button is pressed.

  • false (default) - An app cannot receive the back key event. Instead, webOS TV platform manages history using standard HTML history API such ashistory.pushState(), history.back(), and popState event.
  • true - An app can receive the back key event. The method how to process the back key event should be implemented in the app.
For more information about this property, refer to Back Button.
enyoVersion Optional string

Provides the version of Enyo used for your app. This property is only available when using Enyo template.

  • If you use Enyo framework 2.5.x, set this to "2.5".
  • If you use Enyo framework 2.3.x, set this to "2.3".
In Enyo 2.6, enyoVersion, onDeviceSource properties are no longer used. This property is used for only Enyo v2.5/v2.3.
handlesRelaunch Optional boolean

Determines how a web app handles the webOSRelaunch event.

The webOSRelaunch event occurs whenever a web app is re-launched irrespective of handlesRelaunch property value. However, the value (true or false) determines whether the app can take background action or not. If the app sets handlesRelaunch to:

  • false (default) - webOS will pass the webOSRelaunch event to the app. However, the app does not handle the webOSRelaunch event. webOS will automatically display the app in the full-screen mode.
  • true - webOS will pass the webOSRelaunch event to the app. The app needs to handle the webOSRelaunch event in the background for a while. Then, the app comes to the foreground by calling the PalmSystem.activate() method. See App Lifecycle for more details.
icon Required string

Image displayed for your app, 80x80 pixels and should be in PNG format. The file path must be relative to the appinfo.json file.

  • Default Value: "icon.png"
The icon image file specified in this property is only used for app testing. After app submission, the uploaded icon image file (400x400 pixels) at seller lounge will be used as icon, auto-resized, instead of this property.
iconColor Optional string

Indicates the background color for the app tile. The app tile is displayed in the Home, the Launcher, and the Recent screen.

  • Default value: white
id Required string

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

  • Start the ID with reverse domain of company/institution. (Recommended)
  • The ID cannot start with the following reverse domain names: com.palm, com.webos, com.lge, com.palmdts
  • Finish the ID with sub domain 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.
largeIcon Required string

Large app icon, 130x130 pixels and should be in PNG format. The largeIcon is displayed in the top left corner of the screen, when the user hovers over an app tile in the Launcher.  The file path must be relative to the appinfo.json file.

The large icon image file specified in this property is used for app testing and required when app submission. After app submission, the uploaded icon image file (400x400 pixels) at seller lounge will be used for as large icon, auto-resized, instead of this property.
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". For native apps, it is the filename of the main executable.
onDeviceSource Optional object

This object field is for using the on-device Enyo framework source. This will reduce application size and speed up application launch.

In Enyo 2.6, enyoVersion, onDeviceSource properties are no longer used. This property and sub properties are used for only Enyo v2.5/v2.3.
onDeviceSource.enyo Optional string

Path of Enyo core library. A JavaScript application framework is emphasizing modularity and encapsulation. '2.5' in the string indicates Enyo version and should be same as "enyoVersion" property value.

  • If you use Enyo framework 2.5.x, set this to "$enyo-framework/2.5/enyo".
  • If you use Enyo framework 2.3.x, set this to "$enyo-framework/2.3/enyo".
onDeviceSource.lib/layout Optional string

Path of the layout library. '2.5' in the string indicates Enyo version and should be same as "enyoVersion" property value.

  • If you use Enyo framework 2.5.x, set this to "$enyo-framework/2.5/lib/layout".
  • If you use Enyo framework 2.3.x, set this to "$enyo-framework/2.3/lib/layout".
onDeviceSource.lib/moonstone Optional string

Path of the Moonstone library, the UI library for TV user interfaces. '2.5' in the string indicates Enyo version and should be same as "enyoVersion" property value.

  • If you use Enyo framework 2.5.x, set this to "$enyo-framework/2.5/lib/moonstone".
  • If you use Enyo framework 2.3.x, set this to "$enyo-framework/2.3/lib/moonstone".
onDeviceSource.lib/spotlight Optional string

Path of the Spotlight library, an extensible utility that enables users to navigate Enyo applications using a keyboard or television remote control. Responding to input from the UP, DOWN, LEFT, RIGHT, and RETURN keys. Spotlight provides a navigation experience that compares favorably to that of a mouse on a computer. '2.5' in the string indicates Enyo version and should be same as "enyoVersion" property value.

  • If you use Enyo framework 2.5.x, set this to "$enyo-framework/2.5/lib/spotlight".
  • If you use Enyo framework 2.3.x, set this to "$enyo-framework/2.3/lib/spotlight".
onDeviceSource.lib/enyo-ilib Optional string Path of the ilib library, an Enyo wrapper for ilib, a globalization/inter-nationalization library. '2.5' in the string indicates Enyo version and should be same as "enyoVersion" property value.
  • If you use Enyo framework 2.5.x, set this to "$enyo-framework/2.5/lib/enyo-ilib".
  • If you use Enyo framework 2.3.x, set this to "$enyo-framework/2.3/lib/enyo-ilib".
onDeviceSource.lib/enyo-cordova Optional string

Path of the enyo-cordova library, an Enyo-compatible library to automatically include the platform-specific Cordova library. '2.5' in the string indicates Enyo version and should be same as "enyoVersion" property value.

  • If you use Enyo framework 2.5.x, set this to "$enyo-framework/2.5/lib/enyo-cordova".
  • If you use Enyo framework 2.3.x, set this to "$enyo-framework/2.3/lib/enyo-cordova".
onDeviceSource.lib/enyo-webos Optional string

Path of the enyo-webos library, an Enyo library for webOS-specific kinds and API's. '2.5' in the string indicates Enyo version and should be same as "enyoVersion" property value.

  • If you use Enyo framework 2.5.x, set this to "$enyo-framework/2.5/lib/enyo-webos".
  • If you use Enyo framework 2.3.x, set this to "$enyo-framework/2.3/lib/enyo-webos".
requiredMemory Optional number The requiredMemory describes the maximum usage of memory, in megabytes, while a native app is launching. This is not the same as the maximum memory usage while the app is running.
resolution Optional string

The screen resolution of the app. webOS TV supports following resolutions:

  • "1920x1080": FHD resolution (Default value)
  • "1280x720": HD resolution
webOS TV does not support UHD resolution for web apps.
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.
title Required string

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

The HTML title element in your app can be used for sub-title. The app version or vendor name is recommended for sub-title.
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 decrease and the system background will be shown as little grey color.

  • Default value: false
type Required string The App type to identify only "web" is allowed.
vendor Required string Provides the information of the app owner. This is used in the launcher and deviceinfo dialogs.
version Required string

Provides the app version number, in the dot-notation format. The major, minor, and revision numbers are all mandatory non-negative integers. Leading zeros are stripped. The major, minor, and revision numbers are discrete. For example, 1.5.3 is a lower version than 1.15.3. After uploading an app, the same version cannot be uploaded again. To update and re-upload an app, you must increase the version number.

  • Default value: "1.0.0"

 

Navigation