Xcode 15: Multiple Commands Produce Duplicate Info.plist Error

I am encountering a persistent issue in Xcode 15 where multiple commands produce a duplicate Info.plist error. The specific error message is:

M u ltiple commands produce '/Users/josephnicholas/Library/Developer/Xcode/DerivedData/Restaurant_Build-bapndkzqxdjxxbacjwattbpeqof/Build/Products/Debug-iphoneos/Restaurant Build.app/Info.plist':

  1. Target 'Restaurant Build' (project 'Restaurant Build') has copy command from '/Users/josephnicholas/Desktop/backups/Restaurant Build/Supporting Files/Info.plist' to '/Users/josephnicholas/Library/Developer/Xcode/DerivedData/Restaurant_Build-bapndkzqxdjxxbacjwattbpeqof/Build/Products/Debug-iphoneos/Restaurant Build.app/Info.plist'
  2. Target 'Restaurant Build' (project 'Restaurant Build') has process command with output '/Users/josephnicholas/Library/Developer/Xcode/DerivedData/Restaurant_Build-bapndkzqxdjxxbacjwattbpeqof/Build/Products/Debug-iphoneos/Restaurant Build.app/Info.plist'

Despite following numerous troubleshooting steps, including deleting the Info.plist file, cleaning the build folder, and creating a new project from scratch, the issue persists. I have ensured the Info.plist path is correctly set in the Build Settings under Packaging, and verified the file's target membership. However, the error remains unresolved.

Here is a detailed list of the steps I have taken:

Deleted the Derived Data multiple times. Restarted Xcode. Deleted the Info.plist file and re-added it through File > New File. Created a new project and manually copied all the files. Verified the Info.plist path and target membership. Followed suggestions from various forums, including adjusting paths and cleaning the build folder. Unfortunately, these steps have not resolved the issue. Attached are screenshots detailing the error messages and my current project setup.

I would greatly appreciate any insights or solutions to this problem.

You appear to be having the same problem I just started having with my Info.plist file. It looks to me like 2 processes in Xcode 15 are trying to generate the Info.plist file. One is generating it from scratch and the other is trying to copy it into the build bundle. Hence the two lines under the error message:

  • Target "Restaurant Build" ...has copy command
  • Target "Restaurant Build" .. has process command

In Build Phases under Copy Bundle Resources I had an an entry for Copy Info.plist. I think that is the copy command.

In Build Settings under Packaging Section there is a parameter to Generate Info.plist file. Mine was set to Yes. I think that is the process command.

I got rid of the Copy Bundle Resources entry for Info.plist and the problem went away for me.

I can also leave the Copy Bundle Resources entry for Info.plist and set Generate Info.plist to No. However that results in a different error - that there is no Info.plist for the bundle. I have some custom properties I need in the Info.plist so my preference is to get the system to recognize the copied Info.plist file. Still working on that.

Hopefully this provides you some assistance. (I just started learning Xcode and Swift so take my information with a grain of salt. When I started learning computer programming in university, we used punch cards to program Fortan.)

Hi, I'm sorry, I thought I had replied to this yesterday. Thanks for the suggestions, I tried to remove the info.plist file from Copy Bundle Resources, but that deletes it from the whole project and creates more errors. I need the Info.plist file in this project, so that doesn't work me, thank you for the suggestion!

Making an Info.plist a target member automatically adds it to the Copy Bundle Resources build phase. Xcode automatically processes the Info.plist. As such, you should not add it to your Copy Bundle Resources build phase nor make it a target member. To resolve your issue, try the following steps:

  • Remove the Info.plist from the Copy Bundle Resource build phase.
  • Locate the Info.plist in your project on the Finder, then add its path to the Info.plist File build setting in the Build Settings pane.

Thank you for the timely! Let me clarify. I didn't manually put 'Info.plist' into the Copy Bundle Resources build phase. It went there when I added the 'Info.plist' file to the project. So there are 4 items in CBR: 'Info.plist', 'Restaurants.json (this is a json file with some points of interest that I want the app to display on a map and it also is automatically placed into Copy Bundle Resources when I add the file to the project (both 'Info.plist' and 'Restaurants.json' are in a group: 'Supporting Files'), 'Preview Assets.xcassets', and 'Assets.xcassets'. When I create the Info.plist file I enter into the path for Info.plist file into the Build Settings pane (under packaging), then I fill out the key for Info.plist (Privacy: Location When In Use Usage Description), and then I clean project and build and the build fails with another error: "Multiple commands produce... target has copy command.. target has process command... warning: duplicate output file '/Users/josephnicholas/Library/Developer/Xcode/DerivedData/RestaurantBuildWednesday-banhgciaerzdxbfpsmekbugfvaug/Build/Products/Debug-iphonesimulator/RestaurantBuildWednesday.app/Info.plist' on task: ProcessInfoPlistFile /Users/josephnicholas/Library/Developer/Xcode/DerivedData/RestaurantBuildWednesday-banhgciaerzdxbfpsmekbugfvaug/Build/Products/Debug-iphonesimulator/RestaurantBuildWednesday.app/Info.plist /Users/josephnicholas/Desktop/backups/RestaurantBuildWednesday/SupportingFiles/Info.plist (in target 'RestaurantBuildWednesday' from project 'RestaurantBuildWednesday')" (screenshot attached) Let me repeat, the Info.plist is added to CBR when I create the file- I did not add it. Here is a screenshot of Copy Bundle Resources:
now, if I remove Info.plist from Copy Bundle Resources, close out Xcode, delete Derived Data, open Xcode and clean and build project the clean succeeds, the build fails immediately with this error: "error: Build input file cannot be found: '/Users/josephnicholas/Desktop/backups/RestaurantBuildWednesday/SupportingFiles/Info.plist'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it? (in target 'RestaurantBuildWednesday' from project 'RestaurantBuildWednesday')" (screenshot attached) . So it seems that I get one error with the 'Info.plist' file included in Copy Bundle Resources, and another error, different but still including the 'info.plist' file and mentioning Derived Data.

When I add the Info.plist file the path still had to be entered in 'Packaging' in the Build Settings area under 'Info.plist File': So I entered: $(SRCROOT)/SupportingFiles/Info.plist in the area next to Info.plist File as you can see in screenshot:
I'll also upload a shot showing Compile Sources, Link Binary w Libraries, and Copy Bundle Resources:

Now tell me if I have made any mistakes: the Compile Sources has two items in it, and the Copy Bundle Resources has 4 items- I did not manually place any of those items, they were placed in these locations by Xcode as I build the project. Link Binary has 2 items both of which I added: CoreLocation.framework and MapKit.framework.

So now, with all this done, I'm just about ready to clean and build the project. I'm gonna give you one more screenshot to show what the Info.plist file looks like in the main editor window too:
and, when I attempt to clean and build the project, the clean succeeds, the build fails immediately. See screenshot:
I then close Xcode, delete Derived Data, reopen Xcode, load project, clean and build: Build fails again. I verify that the path for every file is correct. Close out of Xcode again, delete Derived Data, close down computer, restart, open Xcode, open the project, clean and build: Same error every time.

And to be more thorough, just in case I misunderstood your post, I will now delete the Info.plist from Copy Bundle Resource build phase and verify the path for Info.plist in the Build settings and try to clean/run project one more time (I'll close Xcode and delete Derived Data to be safe before attempting a clean/build.). See these two screenshots:

And, when I do this, I still get an error: error: Build input file cannot be found: '/Users/josephnicholas/Desktop/backups/RBWed/SupportingFiles/Info.plist '. Did you forget to declare this file as an output of a script phase or custom build rule which produces it? (in target 'RBWed' from project 'RBWed') (screenshot attached) I dont have a script phase I'm running on this so I don't really understand why this error pops up unless it is because I have removed 'Info.plist' from Copy Bundle Resources.

From here, if I do add 'Info.plist' to Copy Bundle Resources, then I get the original errors when I clean/build: Multiple Commands Produce... copy command... process commmand... duplicate output file' Any help would be much appreciated and let me apologize for the long winded reply, I am just trying to give all the information you may need. Imac 3.6 GHz 8-Core Intel Core i9 with 32gb and Sonoma 14.6

Issue was resolved after removing the Info.plist (manually created) from the Copy Bundle Resource build phase and from the project.

Xcode 15: Multiple Commands Produce Duplicate Info.plist Error
 
 
Q