react-native run-iosCould not find iPhone 6 simulator 和 Entry, ":CFBundleIdentifier", Does Not Exist

在运行rn app应用时,react-native run-ios 报错出现  

解决办法

 1、react-native run-ios --simulator="iPhone 6",运行时指定启动版本

 2、Open file: 打开:node_modules/react-native/local-cli/runIOS/findMatchingSimulator.js

在30行左右 做如下替换操作

//  if (version.indexOf('iOS') !== 0) {
//    continue;
//  }
    if (version.indexOf('iOS') !== 0 && !version.includes('iOS')) {
          continue;
    }

上面的问题解决后,又遇到下面的问题。 Entry, ":CFBundleIdentifier", Does Not Exist


解决办法:

  1. rm -rf node_modules" 然后 "react-native upgrade" 再 "npm install"  最后,"react-native run-ios

  2.先进入到

cd node_modules/react-native/third-party/glog-{X}.{X}.{X}/

  这里的glog-{X}.{X}.{X},X是版本号。

  然后 控制台输入  ./configure 编译下文件。

./configure

 如果还不能解决问题:请访问;Print: Entry, “:CFBundleIdentifier”, Does Not Exist

   

猜你喜欢

转载自www.cnblogs.com/bruce-gou/p/11111494.html
今日推荐