Yup, this worked for me too. I created and deleted a file in a subproject but Xcode still had a reference to it. The offending file was highlighted in red. Deleting it fixed the issue. Xcode 13.2.1
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: