Reputation: 6228
When I run my React Native
application WebStorm
starting an iPhone X
simulator by default. WebStorm's React Native documentation states that:
If you selected the
Build and launch
checkbox, choose the target platform,Android
oriOS
. Depending on your choice,WebStorm
will run the bundler withreact-native run-ios
or withreact-native run-android.
Optionally, type the arguments to be passed to React Native, for example, specify the simulator type through the
‑‑simulator
flag:‑‑simulator="iPhone 4s"
.
I have set my flag to iPhone Xs Max
as shown below:
But it is still starting iPhone X:
react-native-cli run-ios "‑‑simulator=iPhone Xs Max"
info Found Xcode project MyProject.xcodeproj
info Building using "xcodebuild -project MyProject.xcodeproj -configuration Debug
-scheme MyProject
-destination id=0299DF16-DD84-40FB-8B37-55FC7EFCE271
-derivedDataPath build/MyProject"
The id 0299DF16-DD84-40FB-8B37-55FC7EFCE271
is id of iPhone X.
How can I change this?
Upvotes: 3
Views: 781
Reputation: 6228
I found the problem. What was wrong is dashes of flag simulator. When I copied the code from documentation it had short dashes ‑‑simulator
. Correct one should be --simulator
.
Upvotes: 6