expo-tv-config
Skill4 starsChanged 5 months agoMIT-0View on GitHub
Expo TV configuration: app.json plugins, prebuild settings, platform-specific config for react-native-tvos
In this repository26 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- 10ft-uiSkill
- amazon-devices-vega-app-performanceSkill
- amazon-devices-vega-best-practicesSkill
- amazon-devices-vega-setup-sdkSkill
- android-tv-testingSkill
- changelog-static-siteSkill
- creative-tv-uiSkill
- eas-buildSkill
- firetv-leanbackSkill
- kmp-build-commandsSkill
- kmp-compose-tvSkill
- kmp-data-layerSkill
- kmp-navigationSkill
- kmp-template-anatomySkill
- kmp-themingSkill
- kmp-verify-patternsSkill
- metaSkill
- rn-manifest-wiringSkill
- rn-shared-ui-catalogSkill
- rn-spatial-navigationSkill
- rn-template-anatomySkill
- rn-themingSkill
- vega-sdkSkill
- video-playerSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 4 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 76
After changing app.json (any field).
- Distinctive: line 77
After adding or removing a config plugin.
- Very specific: line 78
After bumping expo SDK or react-native-tvos.
- Distinctive: line 79
After changing the banner or icon.
- Very specific: line 83
After changing only JS/TS code in packages/shared-ui or apps/expo-multi-tv/src/.
- Distinctive: line 84
After updating a non-native dependency.
- Distinctive: line 98
If the user requests a newer SDK, bump deliberately:
- Very specific: line 99
Update expo and react-native (the alias to react-native-tvos) in both apps.
- Very specific: line 100
Update transitive deps that have SDK constraints (expo-router, expo-font, etc.).
- Very specific: line 145
If a plugin update is included in a normal yarn and the agent forgets to prebuild afterward, the build will succeed but the change won't …
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Expo TV configuration
The Expo plugin
@react-native-tvos/config-tvis the single switch that makes an Expo app build for TV. Get this wrong and you ship a phone app to a TV launcher. Get it right and most platform-specific config is automatic.
The one environment variable that matters
EXPO_TV=1This must be set when:
- Running
expo prebuild - Running
expo run:androidorexpo run:iosfor a TV build - Running EAS Build for a TV profile
For harness-driven Android work, prefer expo prebuild followed by the Gradle
wrapper and android run. Treat expo run:android as a manual compatibility
command because Android CLI should own deployment and launch when available.
Without it, the plugin no-ops and you get a mobile build. The expo_prebuild tool always sets it; if a user invokes prebuild manually, the symptom is silent — the build succeeds but the app is wrong.
A handy .envrc (direnv) or shell alias avoids forgetting:
export EXPO_TV=1Plugin options
[
"@react-native-tvos/config-tv",
{
"isTV": true,
"androidTVBanner": "./assets/icon-400x240.png",
"showVerboseWarnings": false
}
]isTV: true— required. Drives Android leanback config and tvOS deployment target.androidTVBanner— path to the 400×240 banner. Required for Android TV / Fire TV. Seefiretv-leanback.md.showVerboseWarnings— verbose prebuild output. Useful when debugging.
What the plugin does (so you know what NOT to do manually)
On Android:
- Adds
<intent-filter>withLEANBACK_LAUNCHERto the main activity - Adds
<uses-feature android:name="android.software.leanback" android:required="false" /> - Adds
<uses-feature android:name="android.hardware.touchscreen" android:required="false" /> - References the banner in the application tag
On iOS:
- Sets deployment target to tvOS
- Switches the Xcode target to Apple TV
- Adjusts Info.plist for TV (removes phone-only keys)
This is why you don't edit native files directly. Anything the plugin does, the plugin owns. Manual edits get clobbered on the next prebuild.
Prebuild — when and why
EXPO_TV=1 npx expo prebuild --clean--clean regenerates ios/ and android/ from scratch. This is what you want in CI and in the harness — reproducible builds. Without --clean, prebuild merges into existing native files and merge conflicts are silent and weird.
When to prebuild
- After changing
app.json(any field). - After adding or removing a config plugin.
- After bumping
expoSDK orreact-native-tvos. - After changing the banner or icon.
When NOT to prebuild
- After changing only JS/TS code in
packages/shared-uiorapps/expo-multi-tv/src/. JS bundles don't require regeneration. - After updating a non-native dependency. Prebuild is for native config; JS deps don't need it.
Unnecessary prebuilds cost 60–120s and risk wiping any custom native edits (which the agent shouldn't have made, but).
SDK version pin
The template ships with Expo SDK 51 and react-native-tvos@0.74-stable (or whatever the README states — verify on clone). Compatibility table:
| Expo SDK | react-native-tvos version | Notes |
| 51 | 0.74-stable | Template default |
| 52 | 0.76-stable | Newer; verify all deps |
| 54 | 0.81-stable | Latest at time of writing; newest TV features |
If the user requests a newer SDK, bump deliberately:
- Update
expoandreact-native(the alias toreact-native-tvos) in both apps. - Update transitive deps that have SDK constraints (
expo-router,expo-font, etc.). yarn install.expo prebuild --clean.- Build for each platform; expect to fix 1–3 small issues per major SDK bump.
The agent should not silently bump. SDK changes are visible diffs.
EAS profile (when EAS Build is in use)
// eas.json
{
"build": {
"preview-tv-android": {
"extends": "preview",
"env": { "EXPO_TV": "1" },
"android": { "buildType": "apk" }
},
"preview-tv-ios": {
"extends": "preview",
"env": { "EXPO_TV": "1" },
"ios": { "simulator": false }
}
}
}env.EXPO_TV is the equivalent of the shell variable. Without it on EAS, you get a mobile build out of the cloud — same symptom as locally.
Common config errors and fixes
| Symptom | Cause | Fix |
| Mobile-looking app on a TV target | EXPO_TV not set during prebuild | Re-run with the env var, --clean |
| Prebuild fails: "android resource not found" | Banner path wrong in app.json | Fix path; rerun prebuild |
| Prebuild succeeds but app crashes on launch | SDK / react-native-tvos version mismatch | Align versions per the table above |
expo run:ios builds a phone app | Xcode scheme is the phone target | Open ios/, switch scheme to the -tvOS variant, or use expo run:ios --device <TV-simulator> |
| "Plugin not found: @react-native-tvos/config-tv" | Plugin not installed in the app's workspace | yarn workspace expo-multi-tv add @react-native-tvos/config-tv |
| Banner appears stretched | Wrong dimensions, not exactly 400×240 | Regenerate at correct size |
When to update plugins vs runtime
Plugin updates → require prebuild. Runtime JS updates → don't.
If a plugin update is included in a normal yarn and the agent forgets to prebuild afterward, the build will succeed but the change won't take effect on native. Always prebuild after a plugin change.
Anti-patterns
- Setting
EXPO_TVinside the JS code. It's a build-time variable. Setting it at runtime does nothing. - Editing
ios/orandroid/directly to "fix" something. Prebuild will erase it. If a fix is needed, write or extend a config plugin. - Skipping
--cleanduring prebuild because "it's faster". It is faster. It's also the source of half of the "works on my machine" bugs. - Running
expo run:ioswhen an iPhone simulator is open. The build may target the phone. Specify the TV device or close the phone simulator first.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

