1063

error: Multiple commands produce '/Users/uesr/Library/Developer/Xcode/DerivedData/OptimalLive-fxatvygbofczeyhjsawtebkimvwx/Build/Products/Debug-iphoneos/OptimalLive.app/Info.plist': 1) Target 'OptimalLive' has copy command from '/Users/uesr/Desktop/workSpace/SEALIVE/SeaLive1.1/OptimalLive/Info.plist' to '/Users/uesr/Library/Developer/Xcode/DerivedData/OptimalLive-fxatvygbofczeyhjsawtebkimvwx/Build/Products/Debug-iphoneos/OptimalLive.app/Info.plist' 2) Target 'OptimalLive' has copy command from '/Users/uesr/Desktop/workSpace/SEALIVE/SeaLive1.1/OptimalLive/Server/Masonry/Info.plist' to '/Users/uesr/Library/Developer/Xcode/DerivedData/OptimalLive-fxatvygbofczeyhjsawtebkimvwx/Build/Products/Debug-iphoneos/OptimalLive.app/Info.plist' 3) Target 'OptimalLive' has process command with input '/Users/uesr/Desktop/workSpace/SEALIVE/SeaLive1.1/OptimalLive/Info.plist'

Running the code in Xcode 9 works, but there is an error in Xcode 10.

8
  • For cocoapods managed dependencies, refer to stackoverflow.com/a/52421345/334999
    – Shuo
    Commented Sep 20, 2018 at 9:04
  • 14
    happens when you import third-party framework to your project and it has info.plist in it's source files. This info.plist conflicts with your app's one. Just remove it from Build phases
    – protspace
    Commented Oct 30, 2018 at 9:29
  • 138
    Dear reader, read EVERY answer to this question, there are many different things that may be wrong.
    – iluvcapra
    Commented Jun 20, 2019 at 22:52
  • Goto path "Build Phases->Copy Bundle Resources". Check for file name and delete the same. Clean and run the apllication Commented Feb 13, 2020 at 8:54
  • 2
    I concur with @iluvcapra. Keep reading and trying the different solutions in this thread. They all work! But only for the right situation. Thank you brother Capra lover. You inspired me to stick with this thread over the course of a couple few days and finally, after trying and eliminating many different possibilities, I DID find the solution, IN THIS THREAD!, toward its certainly ever extending tail, miraculously. IMHO opinion: This error message: error: Multiple commands produce <filename>, is waaaaaay to general. Apple must disambiguate this at some point surly? Commented Jan 20, 2022 at 5:24

105 Answers 105

10

In my case I had the error about the Info.plist duplicate output file :

warning: duplicate output file


/Users/mahdifaraji/Desktop/boilerplate/ios/boilerplate.xcodeproj: warning: The Copy Bundle Resources build phase contains this target's Info.plist file '/Users/mahdifaraji/Desktop/boilerplate/ios/boilerplate/Info.plist'. (in target 'boilerplate' from project 'boilerplate')
warning: duplicate output file '/Users/mahdifaraji/Library/Developer/Xcode/DerivedData/boilerplate-fpkyeiljiiuxbidceadasmpsntah/Build/Products/Debug-iphonesimulator/boilerplate.app/Info.plist' on task: ProcessInfoPlistFile /Users/mahdifaraji/Library/Developer/Xcode/DerivedData/boilerplate-fpkyeiljiiuxbidceadasmpsntah/Build/Products/Debug-iphonesimulator/boilerplate.app/Info.plist /Users/mahdifaraji/Desktop/boilerplate/ios/boilerplate/Info.plist (in target 'boilerplate' from project 'boilerplate')

** BUILD FAILED **

I solved the issue by removing it from Project -> Target -> BuildPhases -> Copy Bundle Resources

1
  • Thanks! it works for me, but I don't understand why.
    – pigfly
    Commented Apr 13, 2023 at 8:05
9

I had bunch of Multiple commands produce warnings - not limited to info.plist duplication in one target. Including localized resources and string files, headers etc.

Solution: remove all duplications in target membership.

1
  • I had this error because i had a watch target with it's own infoplist.strings file which was being copied to the same directory as the main app's infoplist.strings file. They would both end up in the same place when being built.
    – Lyck
    Commented Oct 7, 2018 at 0:10
9

Try all this option anyone of this 3 option will work for you, for sure

Option 1: Remove all files from

Target >> Build Phases >> Compile Sources

Target >> Build Phases >> Copy Bundle Resources

Option 2: Change the build system

Xcode->File->Project Settings-> Build System -> Legacy Build System

Option 3: remove and update existing pod

pod cache clean PromisesObjC
pod cache clean PromisesSwift
cd [your_project_dir]
rm -rf Pods/
rm Podfile.lock
pod update

I hope this will help you, Happy coding :-)
1
  • 2
    -1. No it doesn't work "for sure". What is the point in removing compile sources and copy bundle resources?! Project won't work without compiling code and resources.
    – Luten
    Commented Jun 9, 2020 at 8:30
9

It's worth noting that this error can be produced after auto generation of CoreData models where the Codegen is not set to Manual/None.

To correct this in Xcode 10 double click on your xcdatamodeId file and select each of your entities and set Codegen to Manual/None under Class in your Data Model Inspector.

1
  • Yes! And also do a "Clean Build Folder".
    – Dirk
    Commented Feb 6, 2020 at 15:49
9

If you are manually making your entity's CoreDataClass and CoreDataProperties, make sure you go to your xcdatamodel and set the Codegen in the inspector tab to "Manual/None". Xcode will automatically create a duplicate class for you if this is set as "Class Definition".

9

DONT enable legacy build, you're just hiding the problem

I had 2 GoogleService-Info.plist in my project. had to remove the older one and also remove its entry from Build Phases >> Copy Bundle Resources enter image description here

7

Search & Remove duplicate files those are produced from multiple commands.

Here, an extra Info.plist file should be removed (In my case it was Contents.json)

error: Multiple commands produce '/Users/uesr/Library/Developer/Xcode/DerivedData/OptimalLive-fxatvygbofczeyhjsawtebkimvwx/Build/Products/Debug-iphoneos/OptimalLive.app/Info.plist'
1
  • Annoying. I know it's twice the same file so I never cared about it being copied one over the other.
    – Martin
    Commented Sep 19, 2018 at 12:57
7

This basically means you have multiple files named Info.plist; Usually it's fine, but accidentally yours files are set to the same Target Membership. So the fix is: click each each file and check their Target Membership on the right, make sure they don't overlap.

7

I using Carthage and Xcode 10.

My Solution is -> Project -> Target -> General ->

Remove the Frameworks added with Carthage from "Embedded Binaries"

usualy u have to add a script in Build Phases to strip the architecture for app store.

In Xcode 10 the script seems called always. So it copies the frameworks to the right place and you don't have to add them to the General Tab.

Note: if not set -> in Build Settings -> Search Paths -> Framework Search Paths -> set the path to the Framework u added with Carthage .... eg. "$(PROJECT_DIR)/Carthage/Build/iOS"

0
7

One of my CocoaPods was oudated and caused the issue. Did an pods update and it worked fine.

I believe it may have been the LivePerson SDK

2
  • for me i just had to do 'pod install' Commented Dec 10, 2018 at 5:30
  • for me aswell updating NewRelicAgent created the chaos , how did you solved it
    – iMinion
    Commented Feb 3, 2022 at 16:29
7

My problem was a duplicate Product Module Name for both the Action Extension I created and the main target. The solution was changing the Product module name (Under Build Settings) for the Extension.

(XCode 11)

7

The most common, simple, problem:

Your assets folder has two different images, which happen to have the same name.

This can easily happen in assets:

- assets
- - photos of cars
- - - ford
- - - - mustang.jpg
- - - - truck.jpg
- - - chevy
- - - - truck.jpg

Two "truck.jpg"

Just rename one.

1
  • 3
    Thank you! Even ChatGPT couldn't figure this out. Commented Sep 1, 2023 at 1:52
6

Had similar issue but with .swiftdoc files.

I have extensions and unit test targets in project. And they had same "Product Module Name" (PRODUCT_MODULE_NAME in Build Settings) as application. After making names unique issue gone.

6

My issue was in Xcode 10 being run in Mojave, and while trying to run unit tests that I wrote before updating to XCode 10.

In my case, I had this issue while running my TestTarget target. To resolve, I had to:

  • Delete one of the target dependency (in TestTarget > build phases > Target Dependencies)

since I had two other targets besides my TestTarget and both were running the same script and creating/copying files at a certain point.

And that conflicted with what was mentioned in Build System Release Notes for Xcode 10 here:

It is an error for any individual file in the build to be produced by more than one build command. For example, if two targets each declare the same output file from a shell script phase, factor out the declaration of the output file into a single target.

New UPDATE after I updated from Xcode 10.1 to 10.2

Similar issue again showed up after I updated to Xcode 10.2. I have multiple targets in by project: Target1 and Target2, and I solved this issue by:

  • navigating to Edit Scheme > Build and
  • removing one of the target from being built: uncheck the checkbox of Target1 under Test since I knew Target2 imported Target1

Also to note here, Target2's checkbox is to remain checked under Test

6

In my case, I added GoogleService-Info.plist file twice disappointedly to my Firebase project.

I delete first added GoogleService-Info.plist and problem solved.

1
  • Same thing has happened in my case Commented Jan 2, 2022 at 19:28
6
error: Multiple commands produce '/Users/KunshtechNew/Library/Developer/Xcode/DerivedData/chat21-fgjaqebxysmggqfdnetggdbzfqih/Build/Products/Debug-iphonesimulator/Chat21.app/Base.lproj/Chat.strings':
1) Target 'chat21' (project 'chat21') has copy command from '/Users/KunshtechNew/Downloads/chat21-ios-demo-master/TildeskWidget/Chat21Core/Base.lproj/Chat.strings' to '/Users/KunshtechNew/Library/Developer/Xcode/DerivedData/chat21-fgjaqebxysmggqfdnetggdbzfqih/Build/Products/Debug-iphonesimulator/Chat21.app/Base.lproj/Chat.strings'
2) Target 'chat21' (project 'chat21') has copy command from '/Users/KunshtechNew/Downloads/chat21-ios-sdk-master 2/Chat21Core/Base.lproj/Chat.strings' to '/Users/KunshtechNew/Library/Developer/Xcode/DerivedData/chat21-fgjaqebxysmggqfdnetggdbzfqih/Build/Products/Debug-iphonesimulator/Chat21.app/Base.lproj/Chat.strings'

There can be 2 different solutions to get rid of this problem:

Solution 1

As We can see I was getting the same error.. in my case there was an extra copy of the folder Chat21Core in TildeskWidget folder ..This was creating issue.. So one of the possible solutions can also be just read the error entirely and try to find if there is any extra copy referenced from project or not.

Solution 2

Another simple solution I found when I face same type of issue for different project. This time I had to apply different solution.

  • pod deintegrate from the project.
  • Remove the workspace file and pod.lock file from the project folder.
  • Again pod install and try to build the project.

Hope this might work for you..

6

Remove the damn Assets file

Solution -> Open target -> Build phases > Copy Bundle Resources and remove Assets from there.

3
  • Where is Solution|Open Target Commented May 9, 2020 at 22:39
  • @javadba go to your project and select the appropriate target which is giving you issue and select Build Phases and then select Copy Bundle Resources and remove the assets file from there.
    – Rein rPavi
    Commented May 11, 2020 at 9:18
  • thx Rein rPavi. Even showing targets takes some tinkering in Xcode Commented May 11, 2020 at 10:01
5

Select your scheme (top left corner) -> Edit Scheme... -> Build (left tab) -> uncheck "Find Implicit Dependencies"

enter image description here

And after that you may need to fix any dependencies that were not imported explicitly by your targets.

0
5

In my case, Build archive error vs Xcode10

-1: Multiple commands produce '/Users/kk/Library/Developer/Xcode/DerivedData/react_carday_app-hjahojxsbvmmiyaklrhhuqljdfwv/Build/Intermediates.noindex/ArchiveIntermediates/react_carday_app/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libyoga.a': 1) Target 'yoga' has a command with output '/Users/kk/Library/Developer/Xcode/DerivedData/react_carday_app-hjahojxsbvmmiyaklrhhuqljdfwv/Build/Intermediates.noindex/ArchiveIntermediates/react_carday_app/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libyoga.a' 2) Target 'yoga' has a command with output '/Users/kk/Library/Developer/Xcode/DerivedData/react_carday_app-hjahojxsbvmmiyaklrhhuqljdfwv/Build/Intermediates.noindex/ArchiveIntermediates/react_carday_app/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libyoga.a'

There should something like bellow in your Podfile

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == "React"
      target.remove_from_project
    end

    if target.name == "yoga"
      target.remove_from_project
    end
  end
end

and then run pod install

1
  • Do you know why we need to remove "yoga" in the Podfile?
    – Niebieski
    Commented Sep 26, 2019 at 14:11
5

In my case I found a duplicate in Project -> target -> Build phases -> Copy bundle resources, just I have removed the duplicate, the clean and run and everything works fine

1
  • this did it for me, I had a duplicate plist file in the download folder (??)
    – Fi Li Ppo
    Commented Feb 29, 2024 at 15:10
4

Moving to Xcode 10, errors like

error: Multiple commands produce '/Users/uesr/Library/Developer/Xcode/DerivedData/OptimalLive-fxatvygbofczeyhjsawtebkimvwx/Build/Products/Debug-iphoneos/OptimalLive.app/Info.plist':

can be solved as follows:

Go to Xcode->File->Workspace/Project Settings-> Build System -> Legacy Build System.

2
  • 6
    In this case Xcode is flagging a problem in the project, so reverting to the legacy build system will just hide it for now. Xcode's reporting of these sorts of problems is intentional and it's best to fix the issue. For more information please see help.apple.com/xcode/mac/10.0/#/dev14a2fd0c0. Commented Oct 22, 2018 at 17:40
  • this one did it for me, you sir are a genious
    – samouray
    Commented Dec 14, 2018 at 3:53
4

In Xcode 10, it will work on previous version too

  1. Double click on project
  2. You will see image like below
  3. select TARGET from left
  4. Expand Copy Bundle Resources (0 items)
  5. Remove corresponding file which produces the error

enter image description here

4

I notice the target has a Run Script Phases exactly the same as the [EC] Embed Pods Frameworks. After removing the Run Script, the problem was solved.

enter image description here

0
3

I had the same issue with a plist. Turns out I had two copies of it, one was empty and one was in my localized resources folder. Removing one of them (the empty one) solved the issue.

If you check your error, lines 1) and 2) have different paths. You likely have this file defined twice in your copy phase.

Check your target properties, Build Phases, Copy Bundle Resources, and look for a duplicate info.plist. Figure out which path is incorrect and remove it. (You'll probably want to delete it from the filesystem also.)

3

For dependency projects managed by cocoapods, solved the problem by providing a local podspec to exclude info.plist from sources. Take godzippa as an example

Podfile pod 'Godzippa', :podspec => "venders/godzippa.podspec"

venders/godzippa.podspec s.source_files = 'Sources/*.{h,m}'

3

In my case an Info.plist file was scooped up from one of my Cocoapods. Deleted it and solved the problem.

1
  • How did you find this Info.plist file? Commented Aug 3, 2022 at 6:40
3

In our case, we just cleaned up any debris from "Copy Bundle Resources", only leaving the minimum items.

enter image description here

3

Commenting use_frameworks! in PodFile worked for me.

#use_frameworks!

Note: Did this on XCode 10.1, pod version 1.8.4

3

Same here but here is the latest solution May 2020

It looks like a bug or some new issue with new Xcode version.

Error response is:

Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65.

Detailed response:

Build system information error: Multiple commands produce '/path/of/the/project/ios/build/NameOfTheProject/Build/Products/Debug-iphonesimulator/NameOfTheProject.app/Zocial.ttf':

1) Target 'NameOfTheProject' (project 'NameOfTheProject') has copy command from '/path/of/the/project/NameOfTheProject/node_modules/react-native-vector-icons/Fonts/Zocial.ttf' to '/path/of/the/project/NameOfTheProject/ios/build/NameOfTheProject/Build/Products/Debug-iphonesimulator/NameOfTheProject.app/Zocial.ttf'

2) That command depends on command in Target 'NameOfTheProject' (project 'NameOfTheProject'): script phase “[CP] Copy Pods Resources”

Build system information error: Multiple commands produce '/path/of/the/project/ios/build/NameOfTheProject/Build/Products/Debug-iphonesimulator/NameOfTheProject.app/SimpleLineIcons.ttf':

1) Target 'NameOfTheProject' (project 'NameOfTheProject') has copy command from '/path/of/the/project/NameOfTheProject/node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf' to '/path/of/the/project/NameOfTheProject/ios/build/NameOfTheProject/Build/Products/Debug-iphonesimulator/NameOfTheProject.app/SimpleLineIcons.ttf'

2) That command depends on command in Target 'NameOfTheProject' (project 'NameOfTheProject'): script phase “[CP] Copy Pods Resources”

...

That response repeat for each .ttf file used by the library.

I had to temporary react-native unlink react-native-vector-icons, and the project build again, but with not icons.

3

[Updated] try to checking on Project-> Targets -> (Your name Project) -> Copy Bundle Resources, and check if there is some duplicated name of file related on your error.

After you found duplicate name, remove the one path that shown wrong.

enter image description here

picture above show that I've already removed the wrong one. Sorry I wasnt take screenshoot the errors pictures. Will update if face it again.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.