按照官方文档执行配置环境以后,执行 react-native run-ios
命令行会提示让运行:pod install
。 可是,运行改命令后,老是卡在下载https://github.com/CocoaPods/Specs.git
。
解决办法:
在项目的 ios 目录下,找到 podfile 文件,而后在 target * 上一行添加以下代码:react
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
而后再按照正常的流程来配置便可。
墙,和网络问题可太坑。ios
若是下载被终止,多是请求缓冲大小不够,能够以下设置:git
git config --global http.postBuffer 924288000