I’ve got very similar error: RuntimeError - [Xcodeproj] Unknown object version (56).
It turns out the cocopapods doesn’t know how to work with Xcode 14 project version properly and it complains instead.
To solve the issue, open Xcode project on the right side utility panel and change the project version to Xcode 13.0 - compatible and you are good to go.
