cocoapose很久不用,格式有些變化呀。。。
之前一直是這幾步:
現在安裝你會發現
還有,最後一步執行,你會發現:
報錯,查看原因之後,原來是這樣子:
用:sudo gem install -n /usr/local/bin cocoapods --pre 代替最後一句執行,就可以了!
➜ ~ sudo gem install -n /usr/local/bin cocoapods --pre
ERROR: SSL verification error at depth 1: unable to get local issuer certificate (20)
ERROR: You must add /O=Digital Signature Trust Co./CN=DST Root CA X3 to your local trusted store
ERROR: SSL verification error at depth 1: unable to get local issuer certificate (20)
ERROR: You must add /O=Digital Signature Trust Co./CN=DST Root CA X3 to your local trusted store
Successfully installed xcodeproj-1.5.1
Fetching: ruby-macho-1.1.0.gem (100%)
Successfully installed ruby-macho-1.1.0
Fetching: molinillo-0.5.7.gem (100%)
Successfully installed molinillo-0.5.7
Fetching: cocoapods-trunk-1.2.0.gem (100%)
Successfully installed cocoapods-trunk-1.2.0
Fetching: cocoapods-downloader-1.1.3.gem (100%)
Successfully installed cocoapods-downloader-1.1.3
Fetching: cocoapods-core-1.3.0.rc.1.gem (100%)
Successfully installed cocoapods-core-1.3.0.rc.1
Fetching: cocoapods-1.3.0.rc.1.gem (100%)
Successfully installed cocoapods-1.3.0.rc.1
Parsing documentation for xcodeproj-1.5.1
Installing ri documentation for xcodeproj-1.5.1
Parsing documentation for ruby-macho-1.1.0
Installing ri documentation for ruby-macho-1.1.0
Parsing documentation for molinillo-0.5.7
Installing ri documentation for molinillo-0.5.7
Parsing documentation for cocoapods-trunk-1.2.0
Installing ri documentation for cocoapods-trunk-1.2.0
Parsing documentation for cocoapods-downloader-1.1.3
Installing ri documentation for cocoapods-downloader-1.1.3
Parsing documentation for cocoapods-core-1.3.0.rc.1
Installing ri documentation for cocoapods-core-1.3.0.rc.1
Parsing documentation for cocoapods-1.3.0.rc.1
Installing ri documentation for cocoapods-1.3.0.rc.1
7 gems installed
則說明成功了安裝完成之後,創建項目,終端命令,進入 ******.xcodeproj所在的文件夾,
touch podfile
vim podfile
編輯podfile文件(點擊i 爲可編輯)
完成之後 按 Esc :wq
pod install
關閉項目,雙擊IOS_RuiSuKe.xcworkspace 打開,即可!