Follow the instructions below to run your quick start app on tvOS.
You’ll need macOS to build a You.i React Native app. Consult the Environment Setup topic for macOS to verify that everything is set up properly.
Once your dev environment is all set up, we recommend running through our Quick Start Guide. But if our Quick Start isn’t quick enough for you, here’s an even quicker start.
Install the You.i TV command line interface tool, You.i Platform, and any required dependencies youi-tv doctor
requests.
yarn global add youi-cli
youi-tv login # Enter your product key when prompted.
youi-tv install 6.15.0 # If asked, accept most recent version of Babel or other dependencies
youi-tv doctor # Resolve any missing components (but don't worry about Android for now)
Set up scaffolding for your app with youi-tv init
.
youi-tv init MyApp # Create a folder called MyApp for your project
cd MyApp
Configure your Apple Developer ID by setting the DEVELOPMENT_TEAM_ID environment variable.
DEVELOPMENT_TEAM_ID=<Apple Development Team ID>
You can set the DEVELOPMENT_TEAM_ID
variable to your shell configuration file, such as .bash_profile
or .zshenv
.
If you’re not planning to develop for a given platform, don’t worry too much about its requirements for now.
Just remember the youi-tv doctor
command and run it again if you expand your target platforms.
You can always use youi-tv doctor --help
to get more information about doctor.
Use youi-tv doctor
to validate your configuration.
Make any changes needed to meet the requirements.
Ensure that your Mac and your Apple TV are on the same network.
Ensure that the latest supported version of Xcode supported for your macOS version is installed on your Mac, and the latest supported version of tvOS is installed on your Apple TV. To find out what SDK versions of tvOS your Xcode supports go to Help > Release Notes in Xcode.
On your Apple TV, go to Settings > Remotes and Devices > Remote App and Devices. In Xcode, select Window > Devices and Simulators, you’ll see the Apple TV name displayed. Select the Apple TV name, and click the Pair with <Apple TV name> button. Pair the Apple TV by entering the displayed verification code in Xcode.
If it’s not already running, start the Metro bundler (Yarn server) from your development platform.
yarn start # can be run from any folder in your project
Generate, build, deploy, and launch the tvOS project.
To learn more about the youi-tv run
command, see the youi-tv run
topic.
cd MyApp
youi-tv run -p tvos --device 10.100.xx.xx
# Where 10.100.xx.xx is the device IP address
You can get the device IP address by navigating to Settings > General > About on your Apple TV.
You’ll see the following screen in your Apple TV or the Apple TV simulator.
If you had any issues with this tutorial, you can download a zip file with the completed JavaScript and C++ files. The files contain updates for the entire tutorial and won’t run for all the steps, but they’re useful guides for adding lines of code.