React-native 'config.h' file not found 的解决方法以及可能遇到的问题

问题一
运行Xcode 出现 ‘config.h’ file not found 的问题
解决方案:
打开终端输入:1、cd node_modules/react-native/third-party/glog-0.3.4
2、…/…/scripts/ios-configure-glog.sh

问题二
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
解决方案:
打开终端输入 xcode-select --install
回车后,系统弹出下载xcode,点击确认,下载完成后即可。(实际上不是下载xcode,可能下载xcode有关插件,下载时长约1分钟)

问题三React-native 'config.h' file not found 的解决方法以及可能遇到的问题
以上问题出现在Xcode 项目build的过程中,错误提示Xcode路径定位错误,那就通过命令行重新指定Xcode路径,这里是安装过多个Xcode版本的缘故
解决方案:
打开终端输入 sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/

然后再运行,问题就解决了
1、cd node_modules/react-native/third-party/glog-0.3.4
2、…/…/scripts/ios-configure-glog.sh