Update iOS Simulator device command in React Native docs #32383
Merged
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.
Description
While working through the getting started with native mobile docs, I noticed that I couldn't get
npm run native ios
to launch the iOS simulator with a custom device specified. Despite specifying a device, it would be stuck launching the iPhone 11.It looks as thought we might need to pass the
--simulator
option down a couple of levels through npm when running the command. If I add two sets of--
before the--simulator
option then I can see in the terminal that thereact-native
command gets the appropriate option. Without this, the--simulator
is passed to eithernpm
, or the next level down, which also appears to be npm vianpm run --prefix packages/react-native-editor
.CC: @gwwar as I know you've been looking at getting up and running with native mobile.
How has this been tested?
Follow the instructions in the document and attempt to launch the React Native environment while specifying a custom device. For me, here are the results:
A question for the reader: can you replicate the issue above where it only works with the extra sets of double dashes (
--
)?Screenshots
Types of changes
Checklist:
*.native.js
files for terms that need renaming or removal).