I have updated Mac Operating system in my MacBook Pro with the new version. After updating Pod init is not working.
I am using Version 13.0 (22A380) Ventura [15-inch, 2019] model. Please help me to get it done. Below I am getting the following error
Ignoring ffi-1.15.3 because its extensions are not built. Try: gem pristine ffi --version 1.15.3
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface/error_report.rb:34:in `force_encoding': can't modify frozen String (FrozenError)
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface/error_report.rb:34:in `report'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:66:in `report_error'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:396:in `handle_exception'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:337:in `rescue in run'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:324:in `run'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
from /usr/local/bin/pod:23:in `load'
from /usr/local/bin/pod:23:in `<main>'
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:228:in `initialize_from_file': [Xcodeproj] Unknown object version (56). (RuntimeError)
from /Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:113:in `open'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command/init.rb:41:in `validate!'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:333:in `run'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
from /usr/local/bin/pod:23:in `load'
from /usr/local/bin/pod:23:in `<main>'
When I am trying to run the above command. Then I am getting the following error.
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
If I am trying for the permission for the above folder then I am getting the following error.
Command : chmod ugo+rwx /Library/Ruby/Gems/2.6.0
Result
chmod: Unable to change file mode on /Library/Ruby/Gems/2.6.0: Operation not permitted
4
Answers
It seems that you use your system ruby. Try to avoid that and install
rbenv
orrvm
to manage your ruby versions. For further information why you should not use system ruby see:https://mac.install.guide/faq/do-not-use-mac-system-ruby/index.html
This work for me after updating to macOS 13.0:
Install home-brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install cocoa pods
brew install –cask cocoapods
Then this:
pod setup –verbose
Open your project in Xcode, and under Project Document, change the Project Format into XCode13.0 compatible. Then close the project, and retry pod init.
The error message "Unknown object version (56)" which means there is an incompatibility between the working gem and active one
an step by step solution is:
xcode-select -p
in the terminal.gem update xcodeproj
to update the Xcodeproj gem to the latest version. if it has permission problem run it with sudo like:sudo gem update xcodeproj
.pod install
to install any necessary dependencies and update your project. (if you don’t have podfile in step 4, before running pod install you must use commandpod init
)