By default, RNSampleApp, located at the youiengine/<version>/samples
folder, is initially configured to use a local HTTP server.
That way, you don’t need to configure an Amazon S3 server for static assets and for Component Libraries during initial development of the app.
Later, you may need to mimic more closely an actual deployment scenario. When you reach that point, you can configure your app to use an Amazon S3 server instead of a local HTTP server.
The following figure shows the connectivity between the various devices when testing your app using a local HTTP server.
The local HTTP server is created automatically when the Roku client software attempts to connect to your local app development server.
It automatically creates the export
folder within the executable’s directory.
That is where Component Libraries are put so the Roku client can download them.
By default, the local HTTP server expects all static assets to be located under the assets/drawable/default
folder under the executable’s directory.
If the app has assets for specific formats such as tv
and roku
, they must be copied to the assets/drawable/default
folder under the executable’s directory.
To do this, use the yi_copy_cloud_assets()
CMake function in the project’s CMakeLists.txt
file; for example:
if(COMMAND yi_copy_cloud_assets)
yi_copy_cloud_assets(PROJECT_TARGET ${PROJECT_NAME} OUTPUT_DIRECTORY ${YI_BASE_OUTPUT_DIRECTORY} ASSET_DIRECTORIES tv roku)
endif()
To use the local HTTP server, you must have only one local app development server on your machine.
The following checklist applies to designers and code developers. Use it to prepare your work environment for ongoing work. Also do the steps in Additional Developer Setup Tasks as required.
Done? | Step | Reference |
---|---|---|
1 Ensure the correct version of CMake is installed. | Hardware and Software Specifications | |
2 Install the You.i Platform package. | You.i Platform Installation | |
3 Get started with the You.i React Native Quick Start. | QuickStart |
Refer to the following checklist. Some of the additional tasks apply only if you are working on a legacy You.i C++ app.
Done? | Step | Reference |
---|---|---|
4 Ensure you have a Roku device in Developer mode on the same LAN subnet as the app development platform. Ensure both can reach the Internet. | Device Setup Guide for Roku Developers | |
5 Add the Roku client software to your code base. | Roku Client Customization | |
6 Prepare the Roku device for local testing. | Roku Client Builds | |
7 Locally build a debug version of the app. | Building Roku Apps |
The following figure shows the connectivity between the various devices when testing your app using an Amazon server.
The following checklist applies to designers and code developers. It assumes that you were previously working with a local HTTP server and provides steps to extend that environment to use an Amazon S3 server instead.
Done? | Step | Reference |
---|---|---|
1 Configure CLoud Solution environment variables in .bash_profile (Mac) and Xcode |
Configuring Cloud Solution Environment Variables | |
2 Configure your client to use the port number in YI_CLOUD_SERVER_PORT. | Roku Client Builds |