报错信息如下
### Stack
```
CocoaPods : 1.3.1
Ruby : ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin16]
RubyGems : 2.4.8
Host : Mac OS X 10.13.4 (17E199)
Xcode : 9.3 (9E145)
Git : git version 2.15.1 (Apple Git-101)
Ruby lib dir : /Users/admin/.rvm/rubies/ruby-2.2.2/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 505c6b34ddc68d7d191da228ec77819cb79e45e1
```
### Plugins
```
cocoapods-deintegrate : 1.0.1
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.0.0
cocoapods-trunk : 1.3.0
cocoapods-try : 1.1.0
```
### Error
```
RuntimeError - [Xcodeproj] Unknown object version.
/Users/admin/.rvm/gems/ruby-2.2.2/gems/xcodeproj-1.5.4/lib/xcodeproj/project.rb:217:in `initialize_from_file'
/Users/admin/.rvm/gems/ruby-2.2.2/gems/xcodeproj-1.5.4/lib/xcodeproj/project.rb:102:in `open'
/Users/admin/.rvm/gems/ruby-2.2.2/gems/cocoapods-1.3.1/lib/cocoapods/command/init.rb:41:in `validate!'
/Users/admin/.rvm/gems/ruby-2.2.2@global/gems/claide-1.0.2/lib/claide/command.rb:333:in `run'
/Users/admin/.rvm/gems/ruby-2.2.2/gems/cocoapods-1.3.1/lib/cocoapods/command.rb:52:in `run'
/Users/admin/.rvm/gems/ruby-2.2.2/gems/cocoapods-1.3.1/bin/pod:55:in `<top (required)>'
/Users/admin/.rvm/gems/ruby-2.2.2/bin/pod:23:in `load'
/Users/admin/.rvm/gems/ruby-2.2.2/bin/pod:23:in `<main>'
/Users/admin/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `eval'
/Users/admin/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `<main>'
只需要执行gem install cocoapods --pre
如果系统禁止的话记得前面加上sudo
sudo gem install cocoapods --pre