After xcode13 is upgraded, if a new project is built, pod install will report an error, as shown in the figure:
Reason: This is because the local version of Xcode does not match the version of cocoapods. You need to update cocoapods
solution:
Refer to the solution provided on the Internet and input the command at the terminal $ gem install cocoapods --pre
Error will be reported: You don’t have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
Solution: input in the terminal sudo gem install -n /usr/local/bin cocoapods –pre
It can be used normally in pod install