“Multiple commands produce ‘<path>’” in Xcode: how to fix it
Read the two numbered lines under Xcode’s “Multiple commands produce” error to find the cause: Info.plist, duplicate resources, privacy manifests or Pods.
Xcode stops with “Multiple commands produce '<path to file>'”, followed by two numbered lines such as “1) Target '<App>' (project '<App>') has copy command from '<source>/Info.plist' to '<path>'” and “2) Target '<App>' (project '<App>') has process command with output '<path>'”. It means two build steps would write the same file in the built app, and Xcode refuses to guess which one wins.
Why it happens
Xcode’s build system checks that every output file has exactly one producer. Resources are copied flat into the root of the app bundle, so two files with the same name end up at the same path even if they live in different folders in your project. The usual causes:
- Info.plist is in Copy Bundle Resources. Xcode already processes the Info.plist named in the Info.plist File build setting. Making the file a target member adds a second, plain copy of it.
- Two resources with the same name. Two PrivacyInfo.xcprivacy files, two GoogleService-Info.plist files, or images, fonts or JSON files with the same name in different groups.
- A pod or package ships a file with the same name as yours, often a privacy manifest added as a plain resource instead of inside its own bundle.
- CocoaPods builds the same pod twice. When two targets need different variants of a pod, CocoaPods creates two pod targets, one with a hash in its name, and both can produce the same bundle.
- A Run Script phase declares an output file that another phase also creates.
Read the numbered lines
| What the two lines say | Cause | Fix |
|---|---|---|
| “has copy command from …/Info.plist” and “has process command with output …/Info.plist” | Info.plist copied as a resource | Remove Info.plist from Copy Bundle Resources |
| Two “copy command from” lines with different source paths, same file name | Two resources share a name | Remove one, or rename it |
| The path ends in PrivacyInfo.xcprivacy | Two privacy manifests copied to the app root | Keep one in Copy Bundle Resources |
| Two Pods targets, one with a hash such as 'React-Core-60309c9c-React-Core_privacy' | Same pod built in two variants | Make targets use the same pods, then pod install |
| One line is a script phase | Script output overlaps another phase | Change or remove the script’s Output Files entry |
How to fix it
- Copy the full error from the Issue navigator or the Report navigator. Note the file name at the end of the path and which targets the numbered lines mention.
- For Info.plist: select the app target, open Build Phases → Copy Bundle Resources and remove Info.plist with the minus button. Then check the file’s Target Membership in the File inspector is unticked, and that the Info.plist File build setting points to it. Xcode processes it from there.
- For PrivacyInfo.xcprivacy or another duplicate resource: in Copy Bundle Resources, remove every entry with that name, then add back the one you want. For two different files that both need to ship, rename one or put them in a folder reference or bundle so they don’t land at the same path.
- For a clash between your file and one from a dependency, keep your own file and update the dependency. Well-behaved pods ship their privacy manifest inside their own resource bundle.
- For Pods targets with a hash in the name: compare the targets in your Podfile. If an app target and an extension or test target pull in the same pod with different subspecs or settings, give them the same pods, for example through an abstract_target. Then run pod deintegrate and pod install, and delete DerivedData.
- For a script clash, open the Run Script phase and remove or change the Output Files entry that matches the path.
- Clean the build folder (Product → Clean Build Folder) and build again. If a new “Multiple commands produce” error appears, repeat for the next path. One project can have several.
| Project type | Where duplicates usually come from |
|---|---|
| Native Xcode | Info.plist or PrivacyInfo.xcprivacy in Copy Bundle Resources; same-named assets in two groups |
| React Native (bare) | Pods targets built twice (React-Core, RCT-Folly privacy bundles), or a privacy manifest added both by you and a library |
| Expo (prebuild) | Same as React Native. Re-running prebuild regenerates the ios folder, so fix the cause in app.json, plugins or the Podfile settings rather than by hand |
| Flutter | A plugin pod and the Runner target both adding a file with the same name; run pod install after removing the duplicate |
Questions people ask
Why does the error only appear when I archive?
Archive builds the Release configuration and copies products to different paths. A pod built in two variants, or a resource only included in Release, can clash only there.
Should I turn off “Generate Info.plist File” instead?
Not as a fix for this error. The clash is with the copy in Copy Bundle Resources. Turning off generation can cause a different error if no Info.plist is set in Build Settings.
Can my app and a library both have a privacy manifest?
Yes. They must not land at the same path. Your app’s PrivacyInfo.xcprivacy goes in the app bundle; a library’s should sit inside its own framework or resource bundle.
Does cleaning DerivedData fix it?
Only when the duplicate came from a stale pod target. A duplicate in Copy Bundle Resources comes back on every build until you remove it.
Sources
Check your own name
Domains, both app stores, bundle IDs and every live site using the name, in under a minute.
Check a name