Skip to content

Latest commit

 

History

History
71 lines (45 loc) · 3.2 KB

README.md

File metadata and controls

71 lines (45 loc) · 3.2 KB

ExpoRouterTV 👋

This is an Expo Router SDK 52 project demonstrating how Expo apps can be built for Apple TV and Android TV.

Android TV screenshot

Apple TV screenshot

Some of the packages used:

  • The React Native TV fork, which supports both phone (Android and iOS) and TV (Android TV and Apple TV) targets
  • The React Native TV config plugin, to allow Expo prebuild to modify the project's native files for TV builds
  • The react-native-bottom-tabs package, that provides a fully native tab bar (top bar for Apple TV, bottom bar for Android TV).
  • The react-native-size-matters package, that provides methods and stylesheets for easily scaling the app to different screen sizes.
  • The expo-video package, providing cross-platform video playback for both mobile and TV devices.

🚀 How to use

  • cd into the project

  • TV builds:

yarn
yarn prebuild:tv # Executes Expo prebuild with TV modifications
yarn ios # Build and run for Apple TV
yarn android # Build and run for Android TV
  • Mobile builds:
yarn
yarn prebuild # Executes Expo prebuild without TV modifications
yarn ios # Build and run for iOS
yarn android # Build and run for Android mobile

Development

You can start developing by editing the files inside the app directory. This project uses file-based routing.

This project includes a demo showing how to use React Native TV APIs to highlight controls as the user navigates the screen with the remote control.

TV specific file extensions

This project includes an example Metro configuration that allows Metro to resolve application source files with TV-specific code, indicated by specific file extensions (*.ios.tv.tsx, *.android.tv.tsx, *.tv.tsx).

Get a fresh project

When you're ready, run:

npm run reset-project

This command will move the starter code to the app-example directory and create a blank app directory where you can start developing.

Learn more

To learn more about developing your project with Expo, look at the following resources:

Join the community

Join our community of developers creating universal apps.