Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[react-native-cli] fixed issue with runIOS not being able to launch tvOS app #17660

Closed
wants to merge 3 commits into from

Conversation

joeyjiron06
Copy link

@joeyjiron06 joeyjiron06 commented Jan 19, 2018

Is this a bug report?

Yes.

Have you read the Contributing Guidelines?

Yes

Environment

Environment:
OS: MacOS X 10.12.6 (16G29)
Node: 8.9.4
Yarn: N/A
npm: 5.4.2
Watchman: Not Found
Xcode: 9.2 (9C40b)
Android Studio: N/A

Bug Summary

[CLI iOS runIOS] When using react-native-cli to try to launch the tvOS scheme the user get's an error because the current implementation for launching simulators ignores any simulator/device who's name does not start with iOS

Steps to Reproduce

StackOverflow issue also found here : https://stackoverflow.com/questions/48069690/how-to-select-project-to-run-tvos-version-with-npm-start

Actual command line steps

$npm i -g react-native-cli
...
$react-native init CoolProject
...
$cd CoolProject/
$react-native run-ios --simulator "Apple TV"  --scheme "CoolProject-tvOS"

Scanning folders for symlinks in /Users/jjiron/CoolProject/node_modules (7ms)
Found Xcode project CoolProject.xcodeproj
CoreData: annotation:  Failed to load optimized model at path '/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/Frameworks/InstrumentsPackaging.framework/Versions/A/Resources/XRPackageModel.momd/XRPackageModel 9.0.omo'

Could not find Apple TV simulator

Expected Behavior

The cli tool should launch the tvOS application on the simulator.

Actual Behavior

The user get's an error message saying "Could not find Apple TV simulator"

The Fix

Don't ignore appletv simulators when looking for simulators to launch. Also use the correct application build when selecting which app to launch on the simulator/device.

Test Plan

Added automated test for findMatchingSimulator.js to allow tvOS simulators

Release Notes

[react-native-cli] Fixed issue where you cannot launch tvOS app on Apple TV simulator

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. cla signed labels Jan 19, 2018
@pull-bot
Copy link

pull-bot commented Jan 19, 2018

Warnings
⚠️

📋 Release Notes - This PR may have incorrectly formatted Release Notes.

@facebook-github-bot label Needs more information

Generated by 🚫 dangerJS

@joeyjiron06 joeyjiron06 changed the title [react-native-cli] fixed issue with react-native-cli runIOS not being able to launch tvOS app [react-native-cli] fixed issue with runIOS not being able to launch tvOS app Jan 19, 2018
@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Jan 25, 2018
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shergin is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot facebook-github-bot added Import Failed and removed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Jan 25, 2018
@facebook-github-bot
Copy link
Contributor

I tried to merge this pull request into the Facebook internal repo but some checks failed. To unblock yourself please check the following: Does this pull request pass all open source tests on GitHub? If not please fix those. Does the code still apply cleanly on top of GitHub master? If not can please rebase. In all other cases this means some internal test failed, for example a part of a fb app won't work with this pull request. I've added the Import Failed label to this pull request so it is easy for someone at fb to find the pull request and check what failed. If you don't see anyone comment in a few days feel free to comment mentioning one of the core contributors to the project so they get a notification.

@joeyjiron06
Copy link
Author

joeyjiron06 commented Jan 25, 2018

yes this merges cleanly onto the master branch. im guessing that the merge doesnt work because ci/circleci: build/hold is on hold, and ci/circleci: analyze-pull-request failed. looking at the logs it seems like the npm install failed...not sure why, but i know it can happen from time to time on a CI server.

can someone re-run those jobs and try merging again? (i don't have permissions to run those jobs)

@hramos
Copy link
Contributor

hramos commented Jan 26, 2018

A rebase is needed due to some changes that happened earlier this week in our internal monorepo outside of the synced react-native directory (but nonetheless prevent this PR from landing). Simply hitting Update branch should resolve it, let's see.

@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Jan 26, 2018
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hramos is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@joeyjiron06
Copy link
Author

any update on this @hramos ?

@joeyjiron06
Copy link
Author

why did the bot close this issue?

@hramos
Copy link
Contributor

hramos commented Jan 29, 2018

The bot closes pull requests automatically after merging them.

Plo4ox pushed a commit to Plo4ox/react-native that referenced this pull request Feb 17, 2018
Summary:
Yes.

Yes

Environment:
OS: MacOS X 10.12.6 (16G29)
Node: 8.9.4
Yarn: N/A
npm: 5.4.2
Watchman: Not Found
Xcode: 9.2 (9C40b)
Android Studio: N/A

[CLI iOS runIOS] When using `react-native-cli` to try to launch the tvOS scheme the user get's an error because the current implementation for launching simulators ignores any simulator/device who's name does not start with `iOS`

StackOverflow issue also found here :  https://stackoverflow.com/questions/48069690/how-to-select-project-to-run-tvos-version-with-npm-start

Actual command line steps
```
$npm i -g react-native-cli
...
$react-native init CoolProject
...
$cd CoolProject/
$react-native run-ios --simulator "Apple TV"  --scheme "CoolProject-tvOS"

Scanning folders for symlinks in /Users/jjiron/CoolProject/node_modules (7ms)
Found Xcode project CoolProject.xcodeproj
CoreData: annotation:  Failed to load optimized model at path '/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/Frameworks/InstrumentsPackaging.framework/Versions/A/Resources/XRPackageModel.momd/XRPackageModel 9.0.omo'

Could not find Apple TV simulator
```

The cli tool should launch the tvOS application on the simulator.

The user get's an error message saying "Could not find Apple TV simulator"

Don't ignore appletv simulators when looking for simulators to launch. Also use the correct application build when selecting which app to launch on the simulator/device.

Added automated test for `findMatchingSimulator.js` to allow tvOS simulators

[react-native-cli] Fixed issue where you cannot launch tvOS app on Apple TV simulator
Closes facebook#17660

Differential Revision: D6806327

Pulled By: hramos

fbshipit-source-id: 1a4f37058f3c5d8223012a3e4050e7bbfaafa6c4
grabbou pushed a commit to react-native-community/cli that referenced this pull request Sep 26, 2018
Summary:
Yes.

Yes

Environment:
OS: MacOS X 10.12.6 (16G29)
Node: 8.9.4
Yarn: N/A
npm: 5.4.2
Watchman: Not Found
Xcode: 9.2 (9C40b)
Android Studio: N/A

[CLI iOS runIOS] When using `react-native-cli` to try to launch the tvOS scheme the user get's an error because the current implementation for launching simulators ignores any simulator/device who's name does not start with `iOS`

StackOverflow issue also found here :  https://stackoverflow.com/questions/48069690/how-to-select-project-to-run-tvos-version-with-npm-start

Actual command line steps
```
$npm i -g react-native-cli
...
$react-native init CoolProject
...
$cd CoolProject/
$react-native run-ios --simulator "Apple TV"  --scheme "CoolProject-tvOS"

Scanning folders for symlinks in /Users/jjiron/CoolProject/node_modules (7ms)
Found Xcode project CoolProject.xcodeproj
CoreData: annotation:  Failed to load optimized model at path '/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/Frameworks/InstrumentsPackaging.framework/Versions/A/Resources/XRPackageModel.momd/XRPackageModel 9.0.omo'

Could not find Apple TV simulator
```

The cli tool should launch the tvOS application on the simulator.

The user get's an error message saying "Could not find Apple TV simulator"

Don't ignore appletv simulators when looking for simulators to launch. Also use the correct application build when selecting which app to launch on the simulator/device.

Added automated test for `findMatchingSimulator.js` to allow tvOS simulators

[react-native-cli] Fixed issue where you cannot launch tvOS app on Apple TV simulator
Closes facebook/react-native#17660

Differential Revision: D6806327

Pulled By: hramos

fbshipit-source-id: 1a4f37058f3c5d8223012a3e4050e7bbfaafa6c4
@hramos hramos added the Merged This PR has been merged. label Mar 8, 2019
@react-native-bot react-native-bot removed Import Started This pull request has been imported. This does not imply the PR has been approved. Import Failed labels Mar 8, 2019
facebook-github-bot pushed a commit that referenced this pull request Jan 9, 2020
Summary:
This sync includes the following changes:
- **[19f6fe170](facebook/react@19f6fe170 )**: Revert "Revert "Dispatch commands to both UIManagers from both renderers (#17211)" (#17232)" (#17799) //<Eli White>//
- **[6250462be](facebook/react@6250462be )**: Renamed "ReactDOM-fb" imports to "ReactDOM" in www shims (#17797) //<Brian Vaughn>//
- **[59f21f1b2](facebook/react@59f21f1b2 )**: HostText needs to copy over from current if it is unchanged in persistent  mode (#17538) //<Sebastian Markbåge>//
- **[ccc6100d7](facebook/react@ccc6100d7 )**: Fix comments typos (#17550) //<Nick S. Plekhanov>//
- **[1b9328cd9](facebook/react@1b9328cd9 )**: Null stateNode after unmount (#17666) //<Brian Vaughn>//
- **[897976600](facebook/react@897976600 )**: [ESLint] Allow partial matches for custom Effect Hooks (#17663) //<Dan Abramov>//
- **[72592310a](facebook/react@72592310a )**: Create packages/dom-event-testing-library (#17660) //<Nicolas Gallagher>//
- **[a5e951d4c](facebook/react@a5e951d4c )**: [react-interactions] Event testing library improvements (#17614) //<Nicolas Gallagher>//
- **[7dc974542](facebook/react@7dc974542 )**: [Flight] Chunks API (#17398) //<Sebastian Markbåge>//
- **[9354dd275](facebook/react@9354dd275 )**: Make HostComponent inexact (#17412) //<Eli White>//
- **[4c270375e](facebook/react@4c270375e )**: Favor fallthrough switch instead of case statements for work tags (#17648) //<Sebastian Markbåge>//
- **[6fef7c47a](facebook/react@6fef7c47a )**: Add a regression test for switching from Fragment to a component (#17647) //<Dan Abramov>//
- **[9fe103124](facebook/react@9fe103124 )**: [react-interactions] Rename Flare APIs to deprecated and remove from RN (#17644) //<Dominic Gannaway>//
- **[4b0cdf29a](facebook/react@4b0cdf29a )**: Build FB RN targets only in experimental mode (#17641) //<Dan Abramov>//
- **[7309c5f93](facebook/react@7309c5f93 )**: Use zero-fill right shift instead of Math.floor (#17616) //<伊撒尔>//
- **[3c54df091](facebook/react@3c54df091 )**: Fix missing stacks in WWW warnings (#17638) //<Dan Abramov>//
- **[b66e86d95](facebook/react@b66e86d95 )**: react-refresh@0.7.1 //<Dan Abramov>//
- **[c2d1561c6](facebook/react@c2d1561c6 )**: [Fast Refresh] Support injecting runtime after renderer executes (#17633) //<Dan Abramov>//
- **[f42431abe](facebook/react@f42431abe )**: Revert "Remove renderPhaseUpdates Map (#17484)" (#17623) //<Dan Abramov>//
- **[0b5a26a48](facebook/react@0b5a26a48 )**: Rename toWarnDev -> toErrorDev, toLowPriorityWarnDev -> toWarnDev (#17605) //<Dan Abramov>//
- **[0cf22a56a](facebook/react@0cf22a56a )**: Use console directly instead of warning() modules (#17599) //<Dan Abramov>//
- **[b6c423daa](facebook/react@b6c423daa )**: Use matching test command for equivalence tests (#17604) //<Dan Abramov>//
- **[8a347ed02](facebook/react@8a347ed02 )**: Remove renderPhaseUpdates Map (#17484) //<Sebastian Markbåge>//
- **[be603f5a5](facebook/react@be603f5a5 )**: [react-events] Remove lastNativeEvent in favor of SystemFlags (#17585) //<Dominic Gannaway>//
- **[b15bf3675](facebook/react@b15bf3675 )**: Add component stacks to (almost) all warnings (#17586) //<Dan Abramov>//
- **[2afeebdcc](facebook/react@2afeebdcc )**: [react-interactions] Remove responder root event types + revert commit phase change (#17577) //<Dominic Gannaway>//
- **[9ac42dd07](facebook/react@9ac42dd07 )**: Remove the condition argument from warning() (#17568) //<Laura buns>//
- **[7bf40e1cf](facebook/react@7bf40e1cf )**: Initialize update queue object on mount (#17560) //<Andrew Clark>//
- **[e039e690b](facebook/react@e039e690b )**: Revert Update Queue Refactor //<Andrew Clark>//
- **[b617db3d9](facebook/react@b617db3d9 )**: Refactor Update Queues to Fix Rebasing Bug //<Andrew Clark>//
- **[b43eec7ea](facebook/react@b43eec7ea )**: Replace `wrap-warning-with-env-check` with an eslint plugin (#17540) //<Laura buns>//
- **[acfe4b21b](facebook/react@acfe4b21b )**: [react-interactions] Upgrade passive event listeners to active listeners (#17513) //<Dominic Gannaway>//
- **[5064c7f6a](facebook/react@5064c7f6a )**: Revert Rerender Error Check (#17519) //<Sebastian Markbåge>//
- **[6d105ad3f](facebook/react@6d105ad3f )**: [react-interactions] Move Flare event registration to commit phase (#17518) //<Dominic Gannaway>//
- **[dc18b8b8d](facebook/react@dc18b8b8d )**: Don't group Idle/Offscreen work with other work (#17456) //<Sebastian Markbåge>//
- **[f523b2e0d](facebook/react@f523b2e0d )**: Use fewer global variables in Hooks (#17480) //<Sebastian Markbåge>//
- **[d75323f65](facebook/react@d75323f65 )**: Remove case that only exists for createBatch (#17506) //<Sebastian Markbåge>//
- **[79572e34d](facebook/react@79572e34d )**: Adjust SuspenseList CPU bound heuristic (#17455) //<Sebastian Markbåge>//
- **[969f4b5bb](facebook/react@969f4b5bb )**: Change DevTools hook warning message (#17478) //<Dan Abramov>//
- **[6470e0f16](facebook/react@6470e0f16 )**: [Fresh] Make all errors recoverable (#17438) //<Dan Abramov>//

Changelog:
[General][Changed] - React sync for revisions 6cff70a...19f6fe1

Reviewed By: TheSavior

Differential Revision: D19318286

fbshipit-source-id: acaa5224f7162a274c395a62e54da82199001005
osdnk pushed a commit to osdnk/react-native that referenced this pull request Mar 9, 2020
Summary:
This sync includes the following changes:
- **[19f6fe170](facebook/react@19f6fe170 )**: Revert "Revert "Dispatch commands to both UIManagers from both renderers (facebook#17211)" (facebook#17232)" (facebook#17799) //<Eli White>//
- **[6250462be](facebook/react@6250462be )**: Renamed "ReactDOM-fb" imports to "ReactDOM" in www shims (facebook#17797) //<Brian Vaughn>//
- **[59f21f1b2](facebook/react@59f21f1b2 )**: HostText needs to copy over from current if it is unchanged in persistent  mode (facebook#17538) //<Sebastian Markbåge>//
- **[ccc6100d7](facebook/react@ccc6100d7 )**: Fix comments typos (facebook#17550) //<Nick S. Plekhanov>//
- **[1b9328cd9](facebook/react@1b9328cd9 )**: Null stateNode after unmount (facebook#17666) //<Brian Vaughn>//
- **[897976600](facebook/react@897976600 )**: [ESLint] Allow partial matches for custom Effect Hooks (facebook#17663) //<Dan Abramov>//
- **[72592310a](facebook/react@72592310a )**: Create packages/dom-event-testing-library (facebook#17660) //<Nicolas Gallagher>//
- **[a5e951d4c](facebook/react@a5e951d4c )**: [react-interactions] Event testing library improvements (facebook#17614) //<Nicolas Gallagher>//
- **[7dc974542](facebook/react@7dc974542 )**: [Flight] Chunks API (facebook#17398) //<Sebastian Markbåge>//
- **[9354dd275](facebook/react@9354dd275 )**: Make HostComponent inexact (facebook#17412) //<Eli White>//
- **[4c270375e](facebook/react@4c270375e )**: Favor fallthrough switch instead of case statements for work tags (facebook#17648) //<Sebastian Markbåge>//
- **[6fef7c47a](facebook/react@6fef7c47a )**: Add a regression test for switching from Fragment to a component (facebook#17647) //<Dan Abramov>//
- **[9fe103124](facebook/react@9fe103124 )**: [react-interactions] Rename Flare APIs to deprecated and remove from RN (facebook#17644) //<Dominic Gannaway>//
- **[4b0cdf29a](facebook/react@4b0cdf29a )**: Build FB RN targets only in experimental mode (facebook#17641) //<Dan Abramov>//
- **[7309c5f93](facebook/react@7309c5f93 )**: Use zero-fill right shift instead of Math.floor (facebook#17616) //<伊撒尔>//
- **[3c54df091](facebook/react@3c54df091 )**: Fix missing stacks in WWW warnings (facebook#17638) //<Dan Abramov>//
- **[b66e86d95](facebook/react@b66e86d95 )**: react-refresh@0.7.1 //<Dan Abramov>//
- **[c2d1561c6](facebook/react@c2d1561c6 )**: [Fast Refresh] Support injecting runtime after renderer executes (facebook#17633) //<Dan Abramov>//
- **[f42431abe](facebook/react@f42431abe )**: Revert "Remove renderPhaseUpdates Map (facebook#17484)" (facebook#17623) //<Dan Abramov>//
- **[0b5a26a48](facebook/react@0b5a26a48 )**: Rename toWarnDev -> toErrorDev, toLowPriorityWarnDev -> toWarnDev (facebook#17605) //<Dan Abramov>//
- **[0cf22a56a](facebook/react@0cf22a56a )**: Use console directly instead of warning() modules (facebook#17599) //<Dan Abramov>//
- **[b6c423daa](facebook/react@b6c423daa )**: Use matching test command for equivalence tests (facebook#17604) //<Dan Abramov>//
- **[8a347ed02](facebook/react@8a347ed02 )**: Remove renderPhaseUpdates Map (facebook#17484) //<Sebastian Markbåge>//
- **[be603f5a5](facebook/react@be603f5a5 )**: [react-events] Remove lastNativeEvent in favor of SystemFlags (facebook#17585) //<Dominic Gannaway>//
- **[b15bf3675](facebook/react@b15bf3675 )**: Add component stacks to (almost) all warnings (facebook#17586) //<Dan Abramov>//
- **[2afeebdcc](facebook/react@2afeebdcc )**: [react-interactions] Remove responder root event types + revert commit phase change (facebook#17577) //<Dominic Gannaway>//
- **[9ac42dd07](facebook/react@9ac42dd07 )**: Remove the condition argument from warning() (facebook#17568) //<Laura buns>//
- **[7bf40e1cf](facebook/react@7bf40e1cf )**: Initialize update queue object on mount (facebook#17560) //<Andrew Clark>//
- **[e039e690b](facebook/react@e039e690b )**: Revert Update Queue Refactor //<Andrew Clark>//
- **[b617db3d9](facebook/react@b617db3d9 )**: Refactor Update Queues to Fix Rebasing Bug //<Andrew Clark>//
- **[b43eec7ea](facebook/react@b43eec7ea )**: Replace `wrap-warning-with-env-check` with an eslint plugin (facebook#17540) //<Laura buns>//
- **[acfe4b21b](facebook/react@acfe4b21b )**: [react-interactions] Upgrade passive event listeners to active listeners (facebook#17513) //<Dominic Gannaway>//
- **[5064c7f6a](facebook/react@5064c7f6a )**: Revert Rerender Error Check (facebook#17519) //<Sebastian Markbåge>//
- **[6d105ad3f](facebook/react@6d105ad3f )**: [react-interactions] Move Flare event registration to commit phase (facebook#17518) //<Dominic Gannaway>//
- **[dc18b8b8d](facebook/react@dc18b8b8d )**: Don't group Idle/Offscreen work with other work (facebook#17456) //<Sebastian Markbåge>//
- **[f523b2e0d](facebook/react@f523b2e0d )**: Use fewer global variables in Hooks (facebook#17480) //<Sebastian Markbåge>//
- **[d75323f65](facebook/react@d75323f65 )**: Remove case that only exists for createBatch (facebook#17506) //<Sebastian Markbåge>//
- **[79572e34d](facebook/react@79572e34d )**: Adjust SuspenseList CPU bound heuristic (facebook#17455) //<Sebastian Markbåge>//
- **[969f4b5bb](facebook/react@969f4b5bb )**: Change DevTools hook warning message (facebook#17478) //<Dan Abramov>//
- **[6470e0f16](facebook/react@6470e0f16 )**: [Fresh] Make all errors recoverable (facebook#17438) //<Dan Abramov>//

Changelog:
[General][Changed] - React sync for revisions 6cff70a...19f6fe1

Reviewed By: TheSavior

Differential Revision: D19318286

fbshipit-source-id: acaa5224f7162a274c395a62e54da82199001005
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants