SolvedCocoaPods RuntimeError - [Xcodeproj] Unknown object version.

Report

What did you do?

pod init

What did you expect to happen?

Initialize podfile etc.

What happened instead?

An error occurred

Error

RuntimeError - [Xcodeproj] Unknown object version.
/Users/punky/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project.rb:218:in `initialize_from_file'
/Users/punky/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project.rb:103:in `open'
/Users/punky/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-1.5.0/lib/cocoapods/command/init.rb:41:in `validate!'
/Users/punky/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/claide-1.0.2/lib/claide/command.rb:333:in `run'
/Users/punky/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-1.5.0/lib/cocoapods/command.rb:52:in `run'
/Users/punky/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-1.5.0/bin/pod:55:in `<top (required)>'
/Users/punky/.rbenv/versions/2.4.1/bin/pod:23:in `load'
/Users/punky/.rbenv/versions/2.4.1/bin/pod:23:in `<main>'


## CocoaPods Environment
### Stack

CocoaPods : 1.5.0
Ruby : ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
RubyGems : 2.7.6
Host : macOS 11.6 (20G165)
Xcode : 13.0 (13A233)
Git : git version 2.24.1
Ruby lib dir : /Users/punky/.rbenv/versions/2.4.1/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 5f0e69d664cb8452ef4c0b6ae0ea95ce6d46fc61

### Installation Source

Executable Path: /Users/punky/.rbenv/versions/2.4.1/bin/pod

### 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

## Project that demonstrates the issue

โ„น Please link to a project we can download that reproduces the issue.
You can delete this section if your issue is unrelated to build problems,
i.e. it's only an issue with CocoaPods the tool
[Burgardts.zip](https://github.com/CocoaPods/CocoaPods/files/7280035/Burgardts.zip)
.
16 Answers

โœ”๏ธAccepted Answer

you are on a very old version of cocoapods. please update to latest version and also gem update xcodeproj which should support xcode 13.

Other Answers:

you will need to update cocoapods gem too. gem update cocoapods you are on 1.5.0 whereas the latest version is 1.11.2.

More Issues: