当前位置: 代码迷 >> 综合 >> react-native 出现 Could not find iPhone 6 simulator 与 :CFBundleIdentifier, Does Not Exist
  详细解决方案

react-native 出现 Could not find iPhone 6 simulator 与 :CFBundleIdentifier, Does Not Exist

热度:60   发布时间:2023-12-22 09:59:11.0
  • 升级Xcode 版本发现运行 react-native run-ios 时出现
Could not find iPhone 6 simulator

找到并修改项目下 /node_modules/react-native/local-cli/runIOS/findMatchingSimulator.js 文件

    // 注释掉这部分// if (version.indexOf('iOS') !== 0) {//   continue;// }// 添加if (version.indexOf('iOS') !== 0 && !version.includes('iOS')) {continue;}

重新尝试 react-native run-ios 或者指定模拟器型号 react-native run-ios --simulator="iPhone 6"

  • 仍然出现 ":CFBundleIdentifier", Does Not Exist
先删除全部node依赖
rm -rf node_modules升级 react-native 
react-native upgrade安装依赖并 重新上面的修改
yarn install 

重新尝试 react-native run-ios

?附上相关连接 https://stackoverflow.com/questions/37461703/print-entry-cfbundleidentifier-does-not-exist

  相关解决方案