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 Cycle details:
This seems to happen on any build after the first and can be resolved with Product/Clean Build Folder.
I was wondering if anyone knows a way to automate this step as I need my builds to make it through unattended.
I reported this issue to Apple, and they replied that it’s from the UnityFramework’s “build phases” having the “Headers” after the “Compile Sources”. When rearranged so that Headers is before Compile Sources, this issue no longer happens.
I did ask in a followup why it works the first time after a “Clean Build Folder”, and pointed out that it just started in a recent Xcode version. I expect finger-pointing to happen between Apple and Unity before we get a good solution.
Hey thanks @Gillissie , good that you let them know. It doesn’t sound like it’ll be too much trouble for Unity to fix, I’ll post here if I manage to find anything.
I’m running into this same issue. I’m new to Mac OS, just got my mac book pro this weekend and trying to learn all of this so I can build to ios. Would you mind explaining how to rearrange the headers and compile sources in xcode? Thanks!
By the way, this is Apple’s response to my report:
I reminded them that this issue just started in Xcode 13.3, so it seems like they should fix that. However, I also think Unity should fix their iOS builds so the build phases are in the correct order.
Gillissie workaround above is the one recommended by apple, and we are indeed fixing this internally (no ETA for now, but indeed it would be easier for everyone if we just fixed the project by ourselves)
You are the man! I love the great way to show this, I’m new to Xcode myself but that is just the amazing compared to other documents I could be searching through!
I did a build from newest version of unity, and opened a Xcode workspace project and after the indexing, went to do a build onto my phone and got this error. I’m using Xcode 13.4 Just updated, never had this issue before, I’m trying to fix of moving the headers. When it went to install after doing so. I get this error and this debug log