解决办法,升级coocpod 到 1.5.0
报错信息:
Command
/usr/local/bin/pod init
Report
What did you do?
What did you expect to happen?
What happened instead?
Stack
CocoaPods : 1.4.0
Ruby : ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin17]
RubyGems : 2.6.14
Host : Mac OS X 10.13.4 (17E199)
Xcode : 9.3 (9E145)
Git : git version 2.13.1
Ruby lib dir : /usr/local/Cellar/ruby/2.4.2_1/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ aa5e116f5a953d9f52a88cc51fa75584593a741c
Plugins
cocoapods-deintegrate : 1.0.2
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.
/usr/local/lib/ruby/gems/2.4.0/gems/xcodeproj-1.5.4/lib/xcodeproj/project.rb:217:in `initialize_from_file'
/usr/local/lib/ruby/gems/2.4.0/gems/xcodeproj-1.5.4/lib/xcodeproj/project.rb:102:in `open'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.4.0/lib/cocoapods/command/init.rb:41:in `validate!'
/usr/local/lib/ruby/gems/2.4.0/gems/claide-1.0.2/lib/claide/command.rb:333:in `run'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.4.0/lib/cocoapods/command.rb:52:in `run'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.4.0/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'