same issue, but solution via below link works to me.
Using homebrew install cocoapods to the latest verison 1.11.3
https://stackoverflow.com/questions/61116512/cocoapods-installation-failed-failed-to-build-gem-native-extension
not sure if latest Xcode 14.1 release cause this problem regarding cocoapods version, because everything is ok until end of Oct.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: