2

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

Yigit Guneri
  • 101
  • 5
  • You might find this post in the unity forums insightful: https://forum.unity.com/threads/xcode-version-13-3-13e113-error-cycle-in-dependencies.1268720/ – loptrinho Jun 03 '22 at 07:43
  • In my case, upgrading to Xcode 14 resolved the issue. If you are not using Xcode 14, try upgrading Xcode. – y2ducky Sep 22 '22 at 05:44

4 Answers4

8

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

justinsg
  • 738
  • 6
  • 11
Yigit Guneri
  • 101
  • 5
0

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

enter image description here enter image description here

0

Running in Terminal

defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1

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

0

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

enter image description here

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
yaoxp
  • 3
  • 2