我下载了最近发布的Xcode11测试版,现在我无法在模拟器上运行我的React-Native应用程序。我知道有一些关于堆栈溢出的问题,但他们没有帮助。问题是没有
/node_modules/react-native/local-cli/runIOS/findMatchingSimulator.js
文件。在local-cli
文件夹中,只有一个名为cli.js
的文件
'use strict';
var cli = require('@react-native-community/cli');
if (require.main === module) {
cli.run();
}
module.exports = cli;
发布于 2019-06-06 03:22:03
如果您的项目是使用react-native init创建的,那么您应该能够在CLI<中键入xcrun simctl list devices
以获取所有可用模拟器的列表。滚动到顶部以查看可用设备的列表。如果你想用iPhone XS Max运行模拟器,那么只需要;react-native run-ios --simulator="iPhone XS Max"
发布于 2019-10-28 01:17:20
使用以下命令行添加iPhone X模拟器:
/Applications/Xcode.app/Contents/Developer/usr/bin/simctl create "iPhone X" com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-13-0
为我解决了这个问题。
发布于 2019-09-23 11:38:29
转到Xcode > Open Developer tool > simulator > Add Simulator
https://stackoverflow.com/questions/56466024
复制相似问题