问题一:终端输入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
解决办法: 执行类似**rm -rf /usr/local/share/doc/homebrew
**这样的命令,将他们删除
问题三 服务端集成ProtocolBuffers的时候提示No such module 'ProtocolBuffers'
解决办法:遵循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同级的文件中
// 一定克隆到同级的文件夹,否则当执行步骤7然后运行项目就会报找不到ProtocolBuffers的错误。原因就是如果不克隆到同级的文件夹,项目就只会拿到对ProtocolBuffers的引用,并不能拿到对protobuf-swift这个文件夹的引用,聊天服务器项目必须要引用protobuf-swift文件夹中的所有文件才能够正常使用。
5.git clone https://github.com/alexeyxo/protobuf-swift.git
// cd 到protobuf-swift中的子目录,执行如下命令
6../scripts/build.sh
7:在步骤6的文件中,找到plugin->ProtocolBuffers->ProtocolBuffers.xcodeproj这个文件,然后直接拖动到打开的项目中即可。
8.9如下截图: