Thisguide will take you through the app development process for webOS TV with CLI from creation to debugging. The process comprises creation, packaging, installation, launching, and debugging of an app, and if you are to use webOS TV Simulator, packaging and installation will not be necessary.
Before executing the packaging command, you need to check if the essential files exist. The ares-package command finds and reads the appinfo.json file, where required fields, such as main and icon, are defined, from the app directory. For the same reason, the icon image file and main page file also must exist in the correct path.
Install the created package file on your device using theares-install command. You can also see the list of target devices using the ares-install command. Use theares-setup-device command to modify the settings of a device.
The default loopback address needs to be changed to the remote host address if you are using the emulator on the remote computer for testing. The following example describes how to set the host address of the emulator to the target device.
Use the ares-install command with the--remove option to remove an app from the device. You need to enter the app ID to remove as a parameter. Execute the following command to remove your app from the target device.
You can monitor the execution information of web apps or JS services running on the target device with Web Inspector and Node Inspector, and to do so, you need to create a package file (.ipk) without minifying. This section describes how to create a package file and execute Web Inspector and Node Inspector for debugging purposes.
When creating a package file (.ipk), the ares-packagecommand reduces and merges the source code and adjusts and shrinks variable names and line spacing, which is called minifying. Minifying makes debugging difficult.
To use the Inspectors, the proper version of Chromium, compatible with the webOS TV version, should be installed on your PC. The following table lists the compatible Chromium version by webOS TV version and their download links.
The --hosted(-H) option of theares-launch command allows you to test the code changes easily on the TV device. If the --hosted option is used with the app directory, an app with idcom.sdk.ares.hostedapp is launched on the device and it opens the files in the directory. From CLI v1.12.0, the auto-reloading function is added, so as soon as you make and save modification to your app files, the app on the TV device is automatically reloaded.
To exclude certain files with specific extensions or under specific directories from auto-reloading, create a .reloadignore file. This .reloadignore file should be located in the root directory of the app to test, and the file itself will be excluded from packaging of the app.
Add the absolute or relative path of the files or directories to exclude from auto-reloading into the .reloadignore file. Each item will be distinguished by a line feed, and the relative path of items (except for cases starting with **) will be converted into an absolute path based on the root directory of the app before being applied.
With the command, the execution file of webOS TV Simulator of the specified version, by the --simulator option, in the specified path, by the --simulator-path option, is run, and your app will be launched on that Simulator.
Using the ares-device command with the--resource-monitor (-r) option, you can monitor the usage of CPU and memory at system or process level. You can also set the time interval to get the usage data periodically and save the data in a .csv file.
The packaging process has two phases: minifying source code; and creating a package file. The ares-package command reduces the size of the source code by getting rid of as much redundant code as possible and merges it when creating a package file. The ares-package command adjusts and shrinks the variable names and line spacing and merges multiple files into a single file to reduce the code size and file load time.
Note that only retrieved information is shown if this command fails to retrieve some system information. With theresource-monitor option, you can monitor CPU (%) and memory (KB) usage of the target device or running apps and services.
Ready to receive free Irish terrestrial TV channels but want to do it the easy way? Let us perform the entire Saorview aerial installation process. All you need is an approved TV or set top box and our skilled technicians take care of everything else.
MYTV.ie is the right choice for customers who want high quality equipment installed by skilled technicians who get the job done right the first time. We deliver the best service experience. Our services include a 12 month warranty for added value.
If you are a business owner and you are looking for commercial installation please contact us.
Should additional cabling, bracketry, or labour be required, this may incur an additional fee. This will be discussed with you before work commences.
Images
Product images are for illustrative purposes only and may differ from the actual product. Due to differences in monitors, colours of products may also appear different to those shown on the site. The images on
mytv.ie are copyright protected, but may be used on the condition that the user credits the source of the picture
mytv.ie
3a8082e126