Cycle in dependencies between targets 'Unity-iPhone' and 'UnityFramework'; building could produce unreliable results

Viewed 1033

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.

Xcode Screenshot

Changing build order in Xcode from 'Manual order' to 'Dependency order' may help.

enter image description here enter image description here

Running in Terminal

defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1

To enable the new build system solved the issue for me.

Related