After migrating a project from Xcode 12.4 running Catalina 10.15.5, I'm now running Xcode 13.4.1 on Monterey 12.5.1. Before the migration, there was no such error.
If I do Product > Clean Build Folder, the project builds and runs normally. But if I initiate another build, which I'm directing to the simulator as it happens, I get the following:
Cycle inside Cosmos; building could produce unreliable results. This usually can be resolved by moving the target's Headers build phase before Compile Sources.
When I click the top level item in the project navigator, then select the target, and then build phases I'm in unfamiliar territory; I have never manually done anything in this area of Xcode. I'm not sure what to do.