xcodeunity-game-enginevuforia

Vuforia failing Xcode Build due to unexpected duplicate tasks


We're seeing an immediate build failure in Xcode after opening the exported Xcode Project from an iOS build in Unity.

Xcode indicates that there are "Unexpected duplicate tasks" and provides these two messages:

Target 'Unity-iPhone' (project 'Unity-iPhone') has copy command from '/Users/michael/vc/XXX/Builds/iOS/XXXXcode/Frameworks/com.ptc.vuforia.engine/Vuforia/Plugins/iOS/UnityDriver.framework' to '/Users/michael/Library/Developer/Xcode/DerivedData/Unity-iPhone-eviafjkjongbbigjhjevcxprpjsg/Build/Products/ReleaseForRunning-iphoneos/XXX.app/Frameworks/UnityDriver.framework'

Target 'Unity-iPhone' (project 'Unity-iPhone') has copy command from '/Users/michael/vc/XXX/Builds/iOS/XXXXcode/Frameworks/com.ptc.vuforia.engine/Vuforia/Plugins/iOS/UnityDriver.framework' to '/Users/michael/Library/Developer/Xcode/DerivedData/Unity-iPhone-eviafjkjongbbigjhjevcxprpjsg/Build/Products/ReleaseForRunning-iphoneos/XXX.app/Frameworks/UnityDriver.framework'

It seems like the only workaround right now is to manually delete the duplicate "Embed Framework" step in the Build Phases, but this isn't ideal for our automated build systems.

Relevant Versions:


Solution

  • Turned out this was a bug/regression in a recent Unity update, and can be resolved by updating to Unity 2022.3.16f1.

    Available here: https://unity.com/releases/editor/qa/lts-releases and via Unity Hub.

    Details should be available in this thread, and this Unity bug.