Hey @embassem! I’m here to help you out with any issues you’re facing. Let’s tackle this together!
The “Multiple commands produce” error in Xcode projects, including those generated by Tuist, often occurs when two or more build commands try to create the same output file. In this case, it seems to be related to the UsercentricsUI.framework.
Here are some steps you can take to resolve this issue:
-
Check for Duplicate Framework References: Ensure that
UsercentricsUIis not being added multiple times in your Tuist configuration. This can happen if the framework is declared both as an SPM dependency and manually added elsewhere in the project. -
Review Tuist Configuration: Look into your
Project.swiftorDependencies.swiftfiles to ensure that theUsercentricsUIdependency is declared correctly and not duplicated. Make sure that the framework is only being linked once. -
Exclude Duplicate Resources: If the issue is related to resources within the framework, you might need to exclude certain resources from being copied multiple times. You can use
ResourceFileElement.globto exclude specific resources if necessary [1]. -
Check Build Phases: In the generated Xcode project, inspect the “Build Phases” of the target to ensure that the framework is not being processed multiple times. Look for any custom scripts or phases that might be duplicating the work.
-
Clean Build Folder: Sometimes, residual files in the build folder can cause conflicts. Try cleaning the build folder by going to
Product>Clean Build Folderin Xcode. -
Update Tuist and Dependencies: Ensure that you are using the latest versions of Tuist and the
UsercentricsUIpackage, as updates might contain fixes for such issues.
If these steps do not resolve the issue, you might need to provide more specific details about your Tuist setup or consider simplifying the project to isolate the problem.
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other