RuntimeError - [Xcodeproj] Unknown object version. 报错

### Error

RuntimeError - [Xcodeproj] Unknown object version.
/Users/ios/.rvm/gems/ruby-2.7.0/gems/xcodeproj-1.19.0/lib/xcodeproj/project.rb:227:in initialize_from_file' /Users/ios/.rvm/gems/ruby-2.7.0/gems/xcodeproj-1.19.0/lib/xcodeproj/project.rb:112:inopen'
/Users/ios/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1186:in block (2 levels) in inspect_targets_to_integrate' /Users/ios/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1185:ineach'
/Users/ios/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1185:in block in inspect_targets_to_integrate' /Users/ios/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:insection'
/Users/ios/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1180:in inspect_targets_to_integrate' /Users/ios/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:106:inanalyze'
/Users/ios/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:414:in analyze' /Users/ios/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:239:inblock in resolve_dependencies'
/Users/ios/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in section' /Users/ios/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:238:inresolve_dependencies'
/Users/ios/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:160:in install!' /Users/ios/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/command/install.rb:52:inrun'
/Users/ios/.rvm/gems/ruby-2.7.0/gems/claide-1.0.3/lib/claide/command.rb:334:in run' /Users/ios/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:inrun'
/Users/ios/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/bin/pod:55:in ' /Users/ios/.rvm/gems/ruby-2.7.0/bin/pod:23:inload'
/Users/ios/.rvm/gems/ruby-2.7.0/bin/pod:23:in `

'


――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

[!] Oh no, an error occurred.

原因:

是由于Xcode和cocoapods的版本不一致导致的

解决办法:

终端输入:sudo gem install -n /usr/local/bin cocoapods --pre

你可能感兴趣的:(RuntimeError - [Xcodeproj] Unknown object version. 报错)