一、在运行rn app应用时,react-native run:ios 报错出现
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
然后。查看自己的版本号。Check if your device version is correct, e.g: in line 29 console.log(version) 。在文件30行,对比是否时这个条件:Compare it with condition in line 30: if (version.indexOf('iOS') !== 0) {
下面是我的代码,注释掉的是version.indexOf('iOS') !== 0,然后替换掉。
//if (version.indexOf('iOS') !== 0) {
// continue;
//}
if (version.indexOf('iOS') !== 0 && !version.includes('iOS')) {
continue;
}
更多:如果还不能解决问题,请访问Could not find iPhone 6 simulator after upgrade to Xcode 10
二:上面的问题解决后,又遇到下面的问题。 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
鸣谢---------------------
作者:JonyBin
来源:CSDN
原文:https://blog.csdn.net/qq_33182756/article/details/89764831
No member named '__rip' in '__darwin_arm_thread_state64
打开node_modules/react-native/third-party/glog-0.3.4/src/config.h文件
或者直接在工程中搜PC_FROM_UCONTEXT定义的地方。
替换
/* How to access the PC from a struct ucontext */
#define PC_FROM_UCONTEXT uc_mcontext->__ss.__rip
为
/* How to access the PC from a struct ucontext */
#if defined(__arm__) || defined(__arm64__)
#define PC_FROM_UCONTEXT uc_mcontext->__ss.__pc
#else
#define PC_FROM_UCONTEXT uc_mcontext->__ss.__rip
#endif
鸣谢---------------------
作者:ParadiseDuo
来源:CSDN
原文:https://blog.csdn.net/youshaoduo/article/details/86231961
如果以上还不能解决问题:
If you're using Xcode 10, it may be due to an incompatibility with the latest build system of Xcode. Try switching to the legacy build system.
Open Xcode 10, File > Project Settings > Build System > switch dropdown to Legacy Build System.
完美解决!!!!