Closed youngjuning closed 4 years ago
React Native 0.60 之后 ios 默认使用 CocoaPods,由于墙的存在,导致安装依赖极慢,甚至超时崩溃:
info Installing required CocoaPods dependencies
在网上找了下原因,主要是网络慢或网络连接的原因,解决方案如下:
1、 Ctrl + C 退出命令行
2、 安装 Cocoapods:sudo gem install cocoapods
sudo gem install cocoapods
3、 设置镜像:
$ cd ~/.cocoapods/repos $ pod repo remove master $ git clone https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git master
4、进入自己的工程, 在自己工程的podFile第一行加上:
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
5、安装
pod install
React Native 0.60 之后 ios 默认使用 CocoaPods,由于墙的存在,导致安装依赖极慢,甚至超时崩溃:
在网上找了下原因,主要是网络慢或网络连接的原因,解决方案如下:
1、 Ctrl + C 退出命令行
2、 安装 Cocoapods:
sudo gem install cocoapods
3、 设置镜像:
4、进入自己的工程, 在自己工程的podFile第一行加上:
5、安装