Run pod init
Create a new pod file.
Error was thrown:
โโโ MARKDOWN TEMPLATE โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
/usr/local/bin/pod init
What did you do?
What did you expect to happen?
What happened instead?
CocoaPods : 1.0.1
Ruby : ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
RubyGems : 2.0.14.1
Host : Mac OS X 10.12.6 (16G1036)
Xcode : 9.1 (9B55)
Git : git version 2.13.6 (Apple Git-96)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 92cdc1c38be1a9406c89bf615459f9bacfca7ff0
cocoapods-deintegrate : 1.0.0
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.0.0
cocoapods-trunk : 1.0.0
cocoapods-try : 1.1.0
RuntimeError - [Xcodeproj] Unknown object version.
/Users/Scott/.rvm/gems/ruby-2.2.4@global/gems/xcodeproj-1.2.0/lib/xcodeproj/project.rb:217:in `initialize_from_file'
/Users/Scott/.rvm/gems/ruby-2.2.4@global/gems/xcodeproj-1.2.0/lib/xcodeproj/project.rb:102:in `open'
/Users/Scott/.rvm/gems/ruby-2.2.4@global/gems/cocoapods-1.0.1/lib/cocoapods/command/init.rb:41:in `validate!'
/Users/Scott/.rvm/gems/ruby-2.2.4@global/gems/claide-1.0.0/lib/claide/command.rb:333:in `run'
/Users/Scott/.rvm/gems/ruby-2.2.4@global/gems/cocoapods-1.0.1/lib/cocoapods/command.rb:50:in `run'
/Users/Scott/.rvm/gems/ruby-2.2.4@global/gems/cocoapods-1.0.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
โโโ TEMPLATE END โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=%5BXcodeproj%5D+Unknown+object+version.&type=Issues
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
It's only an issue with CocoaPods the tool.
Running Xcode Version 9.1 (9B55)
Re-ran sudo gem install cocoapods to update / install additional pods.
Issue still remains. I'm unable to initialise the pod file.
Please use CocoaPods 1.4.0.beta.2 or 1.3.1 it looks like you are an outdated version. I will re-open if you attempt this and it still does not work.
Hey,
I've tried installing the latest CocoaPods by doing the following:
sudo gem install cocoapods
then
pod setup
the output in the terminal after the setup completed is as follows:
CocoaPods 1.4.0.beta.2 is available.
To update use:sudo gem install cocoapods --pre
[!] This is a test version we'd love you to try.
For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.4.0.beta.2
Setup completed
I then went to my directory and issued the following command:
pod init
The error mention in my post appeared again.
I then decided to check the version of CocoaPods I was using:
pod --version
output:
1.0.1
So the question is how can I switch to the latest version i've just downloaded?
Also when I run the following:
gem list --local | grep cocoapods
The output is:
cocoapods (1.0.1)
cocoapods-core (1.0.1)
cocoapods-deintegrate (1.0.0)
cocoapods-downloader (1.1.0)
cocoapods-plugins (1.0.0)
cocoapods-search (1.0.0)
cocoapods-stats (1.0.0)
cocoapods-trunk (1.0.0)
cocoapods-try (1.1.0)
Any assistance would be great.
Thanks in advance.
Try gem install cocoapods -v 1.4.0.beta.2 or gem install cocoapods -v 1.3.1
gem install cocoapods -v 1.3.1 worked like a charm!
Thanks.
Most helpful comment
Try
gem install cocoapods -v 1.4.0.beta.2orgem install cocoapods -v 1.3.1