I had the same problem and running sudo gem update xcodeproj in the Terminal fixed it for me. Only the newest version of xcodeproj (1.22.0) supports Xcode 14.0. This is the advice for projects that use pods.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: