0

I am looking to modify launch.json such that I can change the simulated iOS device used to debug a react native app. The default configuration for debugging an iOS reactive native app looks like this:

{
 "name": "Debug iOS",
 "program": "${workspaceRoot}/.vscode/launchReactNative.js",
 "type": "reactnative",
 "request": "launch",
 "platform": "ios",
 "sourceMaps": true,
 "outDir": "${workspaceRoot}/.vscode/.react"
}

I have tried changing the "name" field to one of the device names in the list generated by running

xcrun simctl list devices

For example, I have set

"name": "iPhone 7"

But this does not work. I am aware of the solution posted at https://stackoverflow.com/a/37329896/5563513 but I am looking to see if (and if so, how) I can set the simulated device in launch.json.

asked Feb 11, 2019 at 23:13

1 Answer 1

3

Add the lines below into your .vscode/settings.json file (create if now exist)

{
 "react-native.ios.runArguments.simulator": [
 "--simulator", "iPhone 6"
 ]
}
answered May 6, 2019 at 10:08
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.