my installed xcode9-beta4.
Able to use 'cocopod'.
Can not execute the command is 'pod init'.
CoacoaPods : 1.0.1
Ruby : ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]
RubyGems : 2.4.8
Host : Mac OS X 10.12.6 (16G29)
Xcode : 9.0 (9M214v)
Git : git version 2.14.1
Ruby lib dir : /Users/tongshanli/.rvm/rubies/ruby-2.2.2/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 008eb94ca61ae2aac4cba3e48c4f3be8efe85dc8
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/tongshanli/.rvm/gems/ruby-2.2.2@global/gems/xcodeproj-`
`1.2.0/lib/xcodeproj/project.rb:217:in `initialize_from_file'`
`/Users/tongshanli/.rvm/gems/ruby-2.2.2@global/gems/xcodeproj-`
`1.2.0/lib/xcodeproj/project.rb:102:in `open'`
`/Users/tongshanli/.rvm/gems/ruby-2.2.2@global/gems/cocoapods-`
`1.0.1/lib/cocoapods/command/init.rb:41:in `validate!'`
`/Users/tongshanli/.rvm/gems/ruby-2.2.2@global/gems/claide-1.0.0/lib/claide/command.rb:333:in `run'`
`/Users/tongshanli/.rvm/gems/ruby-2.2.2@global/gems/cocoapods-`
`1.0.1/lib/cocoapods/command.rb:50:in `run'`
`/Users/tongshanli/.rvm/gems/ruby-2.2.2@global/gems/cocoapods-1.0.1/bin/pod:55:in `<top `
`(required)>'`
`/Users/tongshanli/.rvm/rubies/ruby-2.2.2/bin/pod:23:in `load'`
`/Users/tongshanli/.rvm/rubies/ruby-2.2.2/bin/pod:23:in `<main>'`
`/Users/tongshanli/.rvm/gems/ruby-2.2.2@global/bin/ruby_executable_hooks:15:in `eval'`
`/Users/tongshanli/.rvm/gems/ruby-2.2.2@global/bin/ruby_executable_hooks:15:in `<main>'
Can you attach a sample project please?
Please upgrade to CocoaPods 1.3.1 also and if you can upload a sample project. Screenshot is not particularly helpful.
I am going to close this.Will re-open if a proper sample project is attached which demonstrates the issue. Also make sure to update to CocoaPods 1.3.1.
Hi Tonshell
I was also facing same problem since last three days, but its solution is pretty easy which Finally I configured within 5 minutes.
lets move towards the solution.
Step 1. Open your Terminal.
and you are in your default users's Directory.
Step 2. just write following command to update or install your pod
[sudo] gem install cocoapods
if that above command does not works, no needs to worry about, because you will be having sudo less gem in your mac machine.
So after that try this command.
gem install cocoapods --user-install
this will install or updates latest version of pod in your current Users directory smoothly
Remember, NO needs to step into or step out of any directory when you open your terminal very first time, because you'll be in your default user's directory very first time you open your terminal,
Otherwise if you stepped in our stepped out any directory just close your terminal and reopen and to repeat step number 2.
Step 3. Now move to your required project's directory and to install pod while using following command
pod init
and after adding your required dependencies to your pod install it while using following command
pod install
please leave your comment if it works out....
I was getting the same error. So I updated the cocoa Pods to 1.4.0 version. It worked.
I was getting the same error.
CocoaPods : 1.4.0
Ruby : ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin17]
RubyGems : 2.6.14
Host : Mac OS X 10.13.4 (17E199)
Xcode : 9.3 (9E145)
Git : git version 2.15.1 (Apple Git-101)
Ruby lib dir : /usr/local/Cellar/ruby/2.4.2_1/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 39c89298b9c5325629d48eadd391c455a8927631
PrivatePods - https://github.com/ModulizationDemo/PrivatePods.git @ 15670ad09d48a8659723fee7ab238cd965416326
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
RuntimeError - [Xcodeproj] Unknown object version.
/usr/local/lib/ruby/gems/2.4.0/gems/xcodeproj-1.5.4/lib/xcodeproj/project.rb:217:in `initialize_from_file'
/usr/local/lib/ruby/gems/2.4.0/gems/xcodeproj-1.5.4/lib/xcodeproj/project.rb:102:in `open'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.4.0/lib/cocoapods/command/init.rb:41:in `validate!'
/usr/local/lib/ruby/gems/2.4.0/gems/claide-1.0.2/lib/claide/command.rb:333:in `run'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.4.0/lib/cocoapods/command.rb:52:in `run'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.4.0/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
gem install xcodeproj
Running bundle update will install the correct version of the xcodeproj gem dependency.
@infinZero i met a same question,and solve it with your solution,thanks.
that did the trick!
I had the same problem in Xcode 9.4.
I fixed it by just update to the newest cocoa pods.
gem install xcodeproj
Worked perfectly..
I solved it by following method:
Step1: update your gems by this command "sudo gem update"
Step2: after successful updating the gem, install the pods by this command "pod install".
Hope fully it will fix your issues.
I solved it by following method:
Step1: update your gems by this command "sudo gem update"
Step2: after successful updating the gem, install the pods by this command "pod install".Hope fully it will fix your issues.
Me too.
Most helpful comment
gem install xcodeproj