【js】react-native Could not find iPhone 6 simulator 和 Entry, ":CFBundleIdentifier", Does Not Exis...

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

 1 Could not find iPhone 6 simulator 

解决办法:

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

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

然后。查看自己的版本号。在文件30行,对比是否时这个条件:

 1 if (version.indexOf('iOS') !== 0) { 2 3 continue 4 } 

下面是我的代码,注释掉的是version.indexOf('iOS') !== 0,然后替换掉。

1  // if (version.indexOf('iOS') !== 0) {
2     //   continue;
3     // }
4     if (version.indexOf('iOS') !== 0 && !version.includes('iOS')) {
5       continue;
6     }

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

解决办法:

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

    2、先进入到

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

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

    然后 ./configure 编译下文件。

1 ./configure
 
 

原文:https://blog.csdn.net/qq_33182756/article/details/89764831

转载于:https://www.cnblogs.com/yeujuan/p/10907352.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值