pod install -verbose 出错 仓库拉不下来 https://github.com/CocoaPods/Specs.git
发布过unity+admob iOS包的开发者应该都有体会,构建版本时unity会很长时间卡在pod install这个过程中,特别是在第一次执行构建xcode项目时,可能整个过程耗时要一个下午!
在这个过程中它会把 https://github.com/CocoaPods/Specs.git 克隆到本地 ~/.cocoapods/repos 的某个目录下,类似执行以下命令:
cd ~/.cocoapods/repos git clone https://github.com/CocoaPods/Specs.git master ## 把仓库克隆到master目录中
想要加快构建速度,可以把该仓库事先离线下载。
方法一:用国内镜像地址 https://gitee.com/mirrors/CocoaPods-Specs 来下来,然后再关联到 https://github.com/CocoaPods/Specs.git
cd ~/.cocoapods/repos git clone https://gitee.com/mirrors/CocoaPods-Specs master
等待下载完毕后,进行关联仓库:
$ cd master $ git init ## git 初始化
Initialized empty Git repository in /Users/xxx/.cocoapods/repos/cocoapods/.git/ ## git init 命令输出结果
$ git remote add origin https://github.com/CocoaPods/Specs ## 关联仓库
查看仓库关联结果,打开~/.cocoapods/repos/master/.git/config 文件:
猜测国内镜像内容与国外内容应该是一样的,版本应该是一致的。若不一致,会不会导致其他问题?好在国内镜像地址下载速度快,几分钟就可以验证结果!
方法二:科(XUE)上[WANG]下载 https://github.com/CocoaPods/Specs.git
cd ~/.cocoapods/repos git clone https://github.com/CocoaPods/Specs.git master ## 把仓库克隆到master目录中
方法三:从其他电脑拷贝或者用其他途径下载下来,放置到 ~/.cocoapods/repos 目录下
cd ~/.cocoapods/repos zip -r master.zip master ## 压缩文件夹 unzip master.zip ## 解压文件
疑问:~/.cocoapods/repos 目录下还有个 名为Spec_Lock 大小为0的文件,需要手动创建么?
vim Spec_Lock :wq!
参考以及感谢网友的无私奉献:
https://blog.51cto.com/jinbeen/5346205
https://wpbeaches.com/how-to-compress-and-uncompress-files-and-folders-in-the-terminal-in-macos-big-sur/
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· DeepSeek 开源周回顾「GitHub 热点速览」
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
2013-03-01 Programming Multiplayer Game - 使用Mysql++操作MySQL数据库
2013-03-01 Programming Multiplayer Games - MySQL常用命令