skip to Main Content

When I run pod init, I got the following error.

RuntimeError - [Xcodeproj] Unknown object version.
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.19.0/lib/xcodeproj/project.rb:227:in `initialize_from_file'
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.19.0/lib/xcodeproj/project.rb:112:in `open'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command/init.rb:41:in `validate!'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:333:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

3

Answers


  1. Chosen as BEST ANSWER

    After investigation, I found I need to run

    sudo gem update xcodeproj 
    

    Then run

    pod init
    

  2. I’ve got very similar error: RuntimeError - [Xcodeproj] Unknown object version (56).

    It turns out the cocopapods doesn’t know how to work with Xcode 14 project version properly and it complains instead.

    To solve the issue, open Xcode project on the right side utility panel and change the project version to Xcode 13.0 - compatible and you are good to go.

    Changing Xcode version to Xcode 13.0 to fix cocoapods issue about object version 56

    Login or Signup to reply.
  3. I initially tried this: sudo gem update xcodeproj

    If it did not work (that was my case):

    brew uninstall cocoapods

    then

    sudo gem install cocoapods

    after that

    pod init

    This worked for me!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search