react-native run-ios “Could not find iPhone X simulator”
问题 这个问题发生在旧的RN版本(0.57,0.58(<0.58.4),…)和Xcode 10.3中,其中可用模拟器的名称得到了一些调整 在文件node_modules/@react native community/cli/build/commands/runIOS/findMatchingSimulator.js中,react native尝试通过简单的.startsWith检查选择正确的模拟器。由于重命名,检查现在应该使用.includes(ref) Found Xcode project appupdateDemo.xcodeproj Could not find iPhone X simulator Error: Could not find iPhone X simulator at resolve (/Users/topbrids/rn_share_pro/appupdateDemo/node_modules/react-native/local-cli/runIOS/runIOS.js:149:13) at new Promise (<anonymous>) at runOnSimulator (/Users/topbrids/rn_share_pro/appupdateDemo/node_modules/react-native/local-cli/runIOS