Apps are required to have metadata before they can be packaged. This metadata is stored in a file called appinfo.json.
webOS device uses appinfo.json to identify the app, its icon, and other information that is needed to launch the app. appinfo.json is located in the app’s root directory and contains a single JSON object.
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.
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.
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.
The launch point for the app. The file path must be relative to the project root directory and needs to point to the following, depending on the app type:
Web app: "index.html"
QML app: "main.qml"
Native app: "<executable file name>"
Icon image displayed for your app. The icon should be in PNG format. The file path must be relative to the project root directory.
Default Value: "icon.png"
App type. The value must be specified as follows depending on the app type:
Web app: "web"
QML app: "qml"
Native app: "native"
Large app icon. The icon should be in PNG format.
Provides the information of the app owner. This is used in Home Launcher and deviceinfo dialogs.
The app version number. This consists of three non-negative integers: major, minor, and revision numbers.
The major, minor, and revision numbers are all mandatory, e.g. "2.1.0" (not "2.1"). Otherwise, the app may not be installed. The major, minor, and revision numbers are discrete. For example, 1.5.3 is lower version than 1.15.3.
Note Each version number (major, minor, and revision) cannot exceed 9 digits and cannot contain leading zeroes.
Default value: "1.0.0"
Provides brief information of the app, like a short tagline for the app. It cannot exceed 60 characters.
The screen resolution of the app. webOS Open Source Edition (OSE) supports the following resolutions:
"1920x1080": FHD resolution (Default value)
"1280x720": HD resolution
Note webOS OSE does not support UHD resolution for web apps.
Indicates the background color for the app tile.
Default value: "white"
Path for a background image to be shown while the app is loading. The file path must be relative to the project root directory. The file should be in PNG format and the image size should be 1920 x 1080.
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
Indicates the minimum amount of memory in megabytes required to run the app.
Specifies the security groups required to run the application.
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.
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:
Note The locale consists of Language, Script, and Country/Region information. (e.g. ko-KR, mn-Cy-MN)
With additional appinfo.json files, title and appDescription 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.
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.