For anyone still having permission issues with this ,Here is what I did after trying all day.
First since I was moving files from Xcode 12.1 to 14.3 on different machine, it seems to have been permissions issues and pod versions.
So removed all the pods and pod install and it worked .
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: