Cycle in dependencies between targets ‘Unity-iPhone’ and ‘UnityFramework’; building could produce unreliable results. This usually can be resolved by moving the target’s Headers build phase before Compile Sources.
Cycle path: Unity-iPhone → UnityFramework → Unity-iPhone
Received with M1 Mac, while trying to build to device from Xcode 13.3
4
Answers
To solve the issue, on Xcode, you need to go to Build Phases -> UnityFramework, and make sure the Headers is listed above the Compile Sources.
Changing build order in Xcode from ‘Manual order’ to ‘Dependency order’ may help.
Running in Terminal
To enable the new build system solved the issue for me.
Move Headers above Compile Sources fixed the error. Please see the image for reference. I have referenced the following Xcode 13.3 Build Failed because of Cycle in Dependencies between targets libsignal-protocol-swift