2018年05月01日19:26:22更新點(diǎn)內(nèi)容:
這種功能是讓我項(xiàng)目是3.2的前提下可以選擇某些三方庫是4.0版本的語言(把那個(gè)3.2改成4.0即可)截圖是往低版本指定,例如,有些三方庫沒有升級(jí)到4.0版本,我們需要對(duì)它指定到3.2版本,而有些庫,例如snapkit,我們使用最新的版本它已經(jīng)把語言升級(jí)到了4.0版本,我們就不能對(duì)他進(jìn)行版本指定,總的來說,你引進(jìn)來的三方庫版本必須要跟你的指定版本是一致的
Main
pod update -- Failed to connect to GitHub to update the CocoaPods/Specs specs repo 問題
這個(gè)問題是我在發(fā)現(xiàn)pod三方庫導(dǎo)入的時(shí)候出現(xiàn)的compile error問題后,我想更新pod庫,但是發(fā)現(xiàn)pod更新出現(xiàn)了這個(gè)問題的.
這是因?yàn)?
Github在不久之前的2018年2月23號(hào)移除了一些低加密標(biāo)準(zhǔn)協(xié)議,包括TLSv1/TLSv1.1漠吻,diffie-hellman-group1-sha1量瓜,diffie-hellman-group14-sha1,相關(guān)鏈接在這里:Weak cryptographic standards removed
這就意味著Mac系統(tǒng)對(duì)應(yīng)的openssl也需要更新途乃。
PS:為了防止鏈接掛掉,這里復(fù)制了其內(nèi)容如下:
執(zhí)行后卻報(bào)了下面的錯(cuò)誤:
Updating spec repo `master`
[!] Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offline, or that GitHub is down
這是為何呢绍傲,明明不久前剛剛更新Cocoapods為1.3.1版本啊。
搜索才發(fā)現(xiàn)是Github在不久之前的2018年2月23號(hào)移除了一些低加密標(biāo)準(zhǔn)協(xié)議耍共,包括TLSv1/TLSv1.1烫饼,diffie-hellman-group1-sha1,diffie-hellman-group14-sha1试读,相關(guān)鏈接在這里:Weak cryptographic standards removed
這就意味著Mac系統(tǒng)對(duì)應(yīng)的openssl也需要更新杠纵。
這里提供了全套升級(jí)辦法,搬運(yùn)過來:
$ which openssl
/usr/bin/openssl
$ openssl version
OpenSSL 0.9.8zh 14 Jan 2016
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew update
$ brew install openssl
$ brew upgrade openssl
`` If you need to have this software first in your PATH run: echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
$ echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
$ source ~/.bash_profile
$ which openssl
/usr/local/opt/openssl/bin/openssl
$ openssl version
OpenSSL 1.0.2n 7 Dec 2017
$ brew install rbenv ruby-build
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
$ echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
$ source ~/.bash_profile
$ rbenv install --list
Available versions:
1.8.5-p52
1.8.5-p113
1.8.5-p114
1.8.5-p115
1.8.5-p231
1.8.6
:
2.5.0-rc1
2.5.0
2.6.0-dev
:
$ rbenv install 2.5.0
$ rbenv versions
* system (set by /Users/username/.rbenv/version)
2.5.0
$ ruby --version
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
$ rbenv global 2.5.0
$ rbenv versions
system
* 2.5.0 (set by /Users/username/.rbenv/version)
$ ruby --version
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin16]
$ gem install cocoapods -n /usr/local/bin
$ which pod
/usr/local/bin/pod
$ pod --version
1.4.0
完成上面一系列操作后钩骇,Cocoapods將會(huì)升級(jí)到最新的1.4.0版本比藻。再執(zhí)行pod repo update master --verbose
就沒有問題了。
說起來有點(diǎn)丟人囧,本來想今天出一個(gè)demo的,但是由于工作的事情需要出門一整天,照相,體檢什么的弄了很久,回來搞demo的時(shí)候又被pod卡了一下,不過幸好解決了,也增加了我對(duì)Swift中語言升級(jí)代理的pod編譯庫指定的理解.