我正在Mac上使用ReactNative应用程序。我已经安装了XCode6。我转到XCode-> Open Developer Tool-> IOS Simulator。现在,当我在VS Code终端上运行以下命令时,这将启动模拟器
react-native run-ios
我遇到以下错误
info Found Xcode project "MyNewProject.xcodeproj"
Usage: simctl list [devices|devicetypes|runtimes]
error Could not parse the simulator list output. Run CLI with --verbose flag for more details.
Error: Command failed: xcrun simctl list --json devices
Usage: simctl list [devices|devicetypes|runtimes]
at checkExecSyncError (child_process.js:629:11)
at Object.execFileSync (child_process.js:647:13)
at runOnSimulator (/Users/ssi/Desktop/ReactNativeApp/MyNewProject/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js:129:30)
at Object.runIOS [as func] (/Users/ssi/Desktop/ReactNativeApp/MyNewProject/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js:97:12)
at Command.handleAction (/Users/ssi/Desktop/ReactNativeApp/MyNewProject/node_modules/react-native/node_modules/@react-native-community/cli/build/cliEntry.js:160:21)
at Command.listener (/Users/ssi/Desktop/ReactNativeApp/MyNewProject/node_modules/commander/index.js:315:8)
at Command.emit (events.js:198:13)
at Command.parseArgs (/Users/ssi/Desktop/ReactNativeApp/MyNewProject/node_modules/commander/index.js:651:12)
at Command.parse (/Users/ssi/Desktop/ReactNativeApp/MyNewProject/node_modules/commander/index.js:474:21)
at setupAndRun (/Users/ssi/Desktop/ReactNativeApp/MyNewProject/node_modules/react-native/node_modules/@react-native-community/cli/build/cliEntry.js:210:24)
我在Google上搜索了很多,但找不到任何有用的信息。任何帮助将不胜感激
答案 0 :(得分:1)
Xcode 6已有5年历史。我相信--json是在Xcode 8或Xcode 8中添加到simctl的。如果要使用它,则需要来自较新的Xcode的较新版本的CoreSimulator。