您好,欢迎来到花图问答。
搜索
您的当前位置:首页cocoa pods 更换源 执行pod install

cocoa pods 更换源 执行pod install

来源:花图问答

问题描述:

1 cocoa pods 更换源 执行pod install

You can try adding it manually in ~/.cocoapods/repos or via pod repo add.

出现:[!] To setup the master specs repo, please run pod setup.

image

Got a temp workaround! Tested with my app and everything is working. This is really only needed if you deleted the master repo. If the master folder is still in your ~/.cocoapods/repos folder with contents then you should be ok to just use pod install --no-repo-update.

  • Try doing a pod setup. This should at minimum download the .git to ~/.cocoapods/repos/master
  • While this is going, you need to move the .git folder from the master folder to somewhere temporary.
  • Stop the pod setup. Delete master folder in repos
  • Use the wget command below to get the zip of the repo wget
  • Unzip the master zip and move its contents to ~/.cocoapods/repos/master
  • Move your .git folder from wherever you put it to ~/.cocoapods/repos/master as .git
  • Go to your project folder, do a pod install --no-repo-update

And you should be good to go!

So in short, here is the basic list of commands I used:

pod setup (in a separate tab)//打开另一个终端执行pod setup 不要关闭
mv ~/.cocoapods/repos/master/.git ~/tempSpecsGitFolder//回到第一个终端 得到.git文件
^C on pod setup tab//按住ctrl+C 退出
wget 
open master.zip (unzipping it)//解压
mv Specs-master ~/.cocoapods/repos/master//修改名称为master
mv ~/tempSpecsGitFolder ~/.cocoapods/repos/master/.git//因为master里面没有.git文件 所以把刚才通过pod setup 生成的.git 文件移过来
cd [project folder]//切换到工程目录
pod install --no-repo-update//执行pod install

还能写东西吗

Copyright © 2019- huatuowenda.com 版权所有 湘ICP备2023022495号-1

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务