cocopods更换新的镜像,淘宝镜像已经不能用了

移动开发 waitig 572℃ 百度已收录 0评论

这两天在整理一个新的项目,需要集成pods,然后发现pod install的时候出现如下错误:

    ### Error
RuntimeError - [Xcodeproj] Unknown object version.
/Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.3.0/lib/xcodeproj/project.rb:217:in `initialize_from_file'
/Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.3.0/lib/xcodeproj/project.rb:102:in `open'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/analyzer.rb:695:in `block (2 levels) in inspect_targets_to_integrate'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/analyzer.rb:694:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/analyzer.rb:694:in `block in inspect_targets_to_integrate'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/user_interface.rb:63:in `section'
...............等等

查找一番终于发现是,pods版本与xcode不匹配了,需要升级,在升级的过程中发现,原先的镜像不能用了,替换镜像升级pods步骤如下

    gem sources –remove https://ruby.taobao.org/

gem sources -a https://gems.ruby-china.org

sudo gem update –system

sudo gem install -n /usr/local/bin cocoapods –pre

在更新gem版本的时候遇到了,如下错误:

    ERROR: While executing gem … (OpenSSL::SSL::SSLError)
hostname “upyun.gems.ruby-china.org” does not match the server certificate

这时不要惊慌,可能是连接不稳,多试几次就没事了,成功之后检查pod版本:pod –version


本文由【waitig】发表在等英博客
本文固定链接:cocopods更换新的镜像,淘宝镜像已经不能用了
欢迎关注本站官方公众号,每日都有干货分享!
等英博客官方公众号
点赞 (0)分享 (0)