This guide explains how to build "ReactTube" for your Apple TV.
- Node.js (Recommended Version: LTS)
- Yarn or npm
- Expo CLI
- Xcode (for tvOS simulation and building on a real device)
- An Apple Developer Account
Ensure you have Node.js and Yarn installed.
Download and install the latest LTS version of Node.js.
npm install -g yarn
Alternatively, use npm:
npm install -g npm
Clone the existing ReactTube project from your version control system:
git clone https://github.com/Duell10111/ReactTube.git
cd ReactTube
Navigate to the project directory and install dependencies:
yarn install
or
npm install
Open the app.json
file in your project and set the isTV settings for tvOS deployment. Here is an example:
{
"expo": {
"name": "ReactTube",
"slug": "reacttube",
"plugins": [
[
"@react-native-tvos/config-tv",
{
"isTV": true, // <- change this to true to build for TV
"showVerboseWarnings": false,
"tvosDeploymentTarget": "13.4",
"removeFlipperOnAndroid": true,
"androidTVBanner": "./assets/images/tv/tv_banner.png",
"appleTVImages": {
"icon": "./assets/images/tv/app_store_icon.png",
"iconSmall": "./assets/images/tv/app_store_icon_400.png",
"topShelf": "./assets/images/tv/app_store_icon_topshelf.png",
"topShelf2x": "./assets/images/tv/app_store_icon_topshelf.png",
"topShelfWide": "./assets/images/tv/app_store_icon_topshelf.png",
"topShelfWide2x": "./assets/images/tv/app_store_icon_topshelf.png"
}
}
]
]
}
}
npx expo prebuild --clean
Open the iOS directory in Xcode:
open ios/ReactTube.xcworkspace
- Go to the project settings and configure your reacttube target.
- Change the build configuration to Release in your schema.
- Select your reacttube target in Xcode.
- Connect your Apple TV to the Mac.
- Click on "Run".