vscode custom rn simulator setting broken

荒凉一梦 提交于 2019-12-11 05:32:06

问题


The key/value pair in my project's settings.json that should change the default ios simulator used by react native does nothing. You can see in this picture that the logs show vscode trying to open an iPhone 6 although I've explicitly requested an iPhone X:

I rebooted vscode after adding this setting, of course. I've also tried uninstalling and reinstalling my copies of vscode, the vscode react native plugin, the ios 12.0 runtime, and Xcode. I've tried deleting all simulators except the one I want.

This is a problem because my recently upgraded copy of Xcode will no longer build to an iPhone 6, so I am unable to use the vscode react native tools.


回答1:


My problem was that I had specified a simulator in my launch.json:

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

I removed the "target": "iPhone 6" key/value pair and the correct simulator booted up.



来源:https://stackoverflow.com/questions/58139569/vscode-custom-rn-simulator-setting-broken

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!