Getting started developing with LG webOS
System Requirements
OS | Requirement |
---|---|
Windows | Windows 10 or higher (64bit only) |
macOS | macOS High Sierra (10.13) or higher (64bit only) |
Linux | Ubuntu 20.04 or higher (64bit only) |
Prerequisites
Node.js: Recommended versions: 14.15.1 - 16.20.2.
NPM: Node Package Manager.
Set Up Your Development Environment
Verify the Node.js and npm installation:
node -v npm -v
Install webOS CLI globally using npm:
npm install -g @webos-tools/cli
Verify the installation:
ares -V
Configure Environment Variables. In VsCode create a file named .zshenv with the next code:
# Setting the LG_WEBOS_TV_SDK_HOME variable to the parent directory of CLI export LG_WEBOS_TV_SDK_HOME="/Users/
/lg_webos_cli" if [ -d "$LG_WEBOS_TV_SDK_HOME/CLI/bin" ]; then # Setting the WEBOS_CLI_TV variable to the bin directory of CLI export WEBOS_CLI_TV="$LG_WEBOS_TV_SDK_HOME/CLI/bin" # Adding the bin directory of CLI to the PATH variable export PATH="$PATH:$WEBOS_CLI_TV" fi - Install and Configure VSCode Extension:
Download and install the webOS TV SDK extension for VSCode.
Restart your PC.
Install the Developer mode app.
In VSCode, click the Plus sign in the new TV icon extension to install a new device. Ensure the LG TV is in developer mode and connected to the same WiFi as your PC.
Select the device, set up SSH Key, and enter the passphrase shown on the STV in developer mode (Enable Key Server).
Create Your Video App
Build the app by running the following command in the root directory of the SDK
$ npx nx run-many -t build
In your LG device, select Install Application, select the app file IPK.
The app now appear below the Installed section below your your-lg-device right-click on it, select Run or Debug.
Test Your App on LG Emulator
Build the app:
$ npx nx run-many -t build
Open the LG Simulator.
Click App in the controller.
Find the dist directory.
Once inside the directory, click open.
Common Issues
Not being able to install an app on your LG device:
- Check the internet connection.
- Verify the LG device is on the same network.
- Confirm if the LG device's IP address has changed.
- Update the LG TV's firmware.
- Factory reset the LG TV.