[eas-cli] Resolve ApplePlatform.TV_OS for managed tvOS targets via EXPO_TV#3907
Draft
douglowder wants to merge 2 commits into
Draft
[eas-cli] Resolve ApplePlatform.TV_OS for managed tvOS targets via EXPO_TV#3907douglowder wants to merge 2 commits into
douglowder wants to merge 2 commits into
Conversation
…PO_TV resolveManagedProjectTargetsAsync returns targets without buildSettings, so getApplePlatformFromTarget defaulted to ApplePlatform.IOS for every managed project. After #3805, non-interactive iOS builds authenticate with the submission ASC API key and validate the provisioning profile against Apple, which then filters on the wrong platform and rejects a valid TVOS_APP_STORE profile as missing — regenerate also picks the wrong platform. Detect the @react-native-tvos/config-tv EXPO_TV convention in resolveManagedProjectTargetsAsync and synthesize buildSettings.TARGETED_DEVICE_FAMILY=3 on the application target and any configured app extensions. The lookup checks both the merged env parameter (which already carries the build profile's env from eas.json plus any EAS server env vars) and process.env as a fallback, so it picks up EXPO_TV whether it lives in the eas.json profile, in EAS server-side environment variables, or in the shell when the user runs "EXPO_TV=1 eas build ...". Values are matched case-insensitively against "1" / "true" / "yes". Every downstream Apple-portal caller (validate, list, create, configure) already routes through getApplePlatformFromTarget, so populating that field at the resolver is the single change needed to pick TVOS_APP_STORE for tvOS managed builds. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
✅ Thank you for adding the changelog entry! |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3907 +/- ##
==========================================
+ Coverage 59.05% 59.05% +0.01%
==========================================
Files 935 935
Lines 40959 40968 +9
Branches 8630 8634 +4
==========================================
+ Hits 24185 24191 +6
- Misses 16678 16681 +3
Partials 96 96 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Why
Non interactive builds were attempting to incorrectly verify tvOS provisioning profiles with settings for the iOS platform.
How
Recognize when EXPO_TV env variable is set, and in that case, set the target platform to tvOS.
Fixes #3905
Test Plan