1.cdn: trunk url couldn't be downloaded
因為 cocoapods 在 1.7 版本中開始引入 cdn 方式
pod repo remove trunk
pod search ***
失敗的話,則需要在 podfile 頂部新增
source ''
2.卡在setting up cocoapods master repo上
刪除專案中與cocoapods有關的東西,包括podfile
執行命令 pod init
如果出現
[!] existing podfile found in directory
執行命令
cd ~/.cocoapods/repos
git clone master
再執行命令
pod init
pod install
然後將需要新增的類庫加到podfile中
pod update
3.syntax error, unexpected ',', expecting keyword_end.
新增多個庫,不指定庫的版本時,不能加逗號
4.卡在cloning spec repo `cocoapods` from `[email protected]:cocoapods/specs.git`
解決:pod setup
cd ~/.cocoapods/repos
git clone --depth 1 master
如果報錯
error: rpc failed; curl 18 transfer closed with outstanding read data remaining
fatal: the remote end hung up unexpectedly
fatal: early eof
fatal: index-pack failed
解決:git config --global http.postbuffer 524288000
Cocoapods安裝步驟整理
更換源 gem是乙個管路ruby庫和程式的標準包,它通過ruby gem 如源來查詢,安裝,公升級,和解除安裝軟體包 gem sources remove gem sources a gem sources l 更新公升級gem 以後出現問題嘗試這個 sudo gem update system 安...
CocoaPods 安裝 使用及常見錯誤
1.開啟 terminal 2.移除現有 ruby 預設源 gem sources remove 3.使用新的源 gem sources a 4.驗證新源是否替換成功 gem sources l 5.安裝 cocoapods sudo gem install cocoapods pod setup ...
CocoaPods 安裝 使用 常見操作錯誤
1.開啟 terminal 2.移除現有 ruby 預設源 gem sources remove 3.使用新的源 gem sources a 4.驗證新源是否替換成功 gem sources l 5.安裝 cocoapods sudo gem install cocoapods pod setup ...