### 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:in
open'
/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:in
each'
/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:in
section'
/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: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: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:in
block 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:in
resolve_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:in
run'
/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:in
run'
/Users/ios/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/bin/pod:55:in <top (required)>' /Users/ios/.rvm/gems/ruby-2.7.0/bin/pod:23:in
load'
/Users/ios/.rvm/gems/ruby-2.7.0/bin/pod:23:in `<main>'
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] Oh no, an error occurred.
原因:
是由于Xcode和cocoapods的版本不一致导致的
解决办法:
终端输入:sudo gem install -n /usr/local/bin cocoapods --pre
网友评论