問(wèn)題一:終端輸入pod --version查看CocoaPods的版本號(hào)時(shí),提示:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin15/rbconfig.rb:213: warning: Insecure world writable dir /usr/local in PATH, mode 040777
解決辦法:參考鏈接
chmod go-w /usr/local
問(wèn)題二、終端輸入ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"提示如下Error
Error: Could not link:
/usr/local/etc/bash_completion.d/brew
Please delete these paths and run `brew update`.
Error: Could not link:
/usr/local/share/doc/homebrew
Please delete these paths and run `brew update`.
Error: Could not link:
/usr/local/share/zsh/site-functions/_brew
Please delete these paths and run `brew update`.
Error: Could not link:
/usr/local/share/man/man1/brew-cask.1
/usr/local/share/man/man1/brew.1
解決辦法: 執(zhí)行類似**rm -rf /usr/local/share/doc/homebrew
**這樣的命令,將他們刪除
問(wèn)題三 服務(wù)端集成ProtocolBuffers的時(shí)候提示No such module 'ProtocolBuffers'
Snip20161216_7.png
解決辦法:遵循9步即可
1.ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2.brew install automake
3.brew install libtool
4.brew install protobuf
// 克隆protobuf-swift文件到項(xiàng)目中的和xxxx.xcodeproj同級(jí)的文件中
// 一定克隆到同級(jí)的文件夾,否則當(dāng)執(zhí)行步驟7然后運(yùn)行項(xiàng)目就會(huì)報(bào)找不到ProtocolBuffers的錯(cuò)誤。原因就是如果不克隆到同級(jí)的文件夾,項(xiàng)目就只會(huì)拿到對(duì)ProtocolBuffers的引用,并不能拿到對(duì)protobuf-swift這個(gè)文件夾的引用,聊天服務(wù)器項(xiàng)目必須要引用protobuf-swift文件夾中的所有文件才能夠正常使用。
5.git clone https://github.com/alexeyxo/protobuf-swift.git
// cd 到protobuf-swift中的子目錄,執(zhí)行如下命令
6../scripts/build.sh
7:在步驟6的文件中,找到plugin->ProtocolBuffers->ProtocolBuffers.xcodeproj這個(gè)文件,然后直接拖動(dòng)到打開的項(xiàng)目中即可。
8.9如下截圖:
Snip20161216_9.png
Snip20161216_6.png