問題一:終端輸入pod --version查看CocoaPods的版本號時,提示:
/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
問題二、終端輸入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ù)端集成ProtocolBuffers的時候提示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文件到項目中的和xxxx.xcodeproj同級的文件中
// 一定克隆到同級的文件夾,否則當(dāng)執(zhí)行步驟7然后運(yùn)行項目就會報找不到ProtocolBuffers的錯誤涛癌。原因就是如果不克隆到同級的文件夾,項目就只會拿到對ProtocolBuffers的引用,并不能拿到對protobuf-swift這個文件夾的引用,聊天服務(wù)器項目必須要引用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這個文件,然后直接拖動到打開的項目中即可先匪。
8.9如下截圖:
Snip20161216_9.png
Snip20161216_6.png