After updating Xcode 14 and while running pod init
I am getting the following error:
(base) shahrukh@percrymbp TestApp_uikit % pod init
Traceback (most recent call last):
9: from /Users/shahrukh/.rvm/gems/ruby-2.7.0/bin/ruby_executable_hooks:24:in `<main>'
8: from /Users/shahrukh/.rvm/gems/ruby-2.7.0/bin/ruby_executable_hooks:24:in `eval'
7: from /Users/shahrukh/.rvm/gems/ruby-2.7.0/bin/pod:23:in `<main>'
6: from /Users/shahrukh/.rvm/gems/ruby-2.7.0/bin/pod:23:in `load'
5: from /Users/shahrukh/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'
4: from /Users/shahrukh/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in `run'
3: from /Users/shahrukh/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/claide-1.0.3/lib/claide/command.rb:333:in `run'
2: from /Users/shahrukh/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.2/lib/cocoapods/command/init.rb:41:in `validate!'
1: from /Users/shahrukh/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:113:in `open'
/Users/shahrukh/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:228:in `initialize_from_file': [Xcodeproj] Unknown object version (56). (RuntimeError)
11: from /Users/shahrukh/.rvm/gems/ruby-2.7.0/bin/ruby_executable_hooks:24:in `<main>'
10: from /Users/shahrukh/.rvm/gems/ruby-2.7.0/bin/ruby_executable_hooks:24:in `eval'
9: from /Users/shahrukh/.rvm/gems/ruby-2.7.0/bin/pod:23:in `<main>'
8: from /Users/shahrukh/.rvm/gems/ruby-2.7.0/bin/pod:23:in `load'
7: from /Users/shahrukh/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'
6: from /Users/shahrukh/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in `run'
5: from /Users/shahrukh/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/claide-1.0.3/lib/claide/command.rb:324:in `run'
4: from /Users/shahrukh/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/claide-1.0.3/lib/claide/command.rb:337:in `rescue in run'
3: from /Users/shahrukh/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/claide-1.0.3/lib/claide/command.rb:396:in `handle_exception'
2: from /Users/shahrukh/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:66:in `report_error'
1: from /Users/shahrukh/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface/error_report.rb:34:in `report'
/Users/shahrukh/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface/error_report.rb:34:in `force_encoding': can't modify frozen String: "[Xcodeproj] Unknown object version (56)." (FrozenError)
I also encountered this problem and downgraded Xcode to 13.4.1 to solve it.
Just run:
gem install xcodeproj
[enter image description here][1]
Change the objectVersion in the pbxproj file to 46 [1]: https://i.stack.imgur.com/gAmXp.png
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.