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 launchcheckbox, choose the target platform,AndroidoriOS. Depending on your choice,WebStormwill run the bundler withreact-native run-iosor withreact-native run-android.Optionally, type the arguments to be passed to React Native, for example, specify the simulator type through the
‑‑simulatorflag:‑‑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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With