I have a project that I developed with Xcode 9, and after switching to Xcode 10 I get an error during build:
error: Multiple commands produce 'SomePath/MyApp.app':
1) Target 'MyApp' has create directory command with output '/SomePath/Kvitt.app'
2) That command depends on command in Target 'MyApp': script phase “[CP] Copy Pods Resources”
I had a similar issue with different project and Info.plist
file, and I solved it using this answer
However, this time the error refers to MyApp.app
, and there is no such file in Copy Bundle Resources
Switching to Legacy Build System makes this go away, but want to know what's causing this and how to fix it in new build system
Any ideas?
I have got the same issue : Build error in Xcode 10 "Multiple commands produce...
:-1: Multiple commands produce '/Users/m/Library/Developer/Xcode/DerivedData/FAR-
axuthwysrkuqbcdvfglntqgbiugn/Build/Products/Debug-
iphonesimulator/F.A.R.app/.gitkeep':
1) Target 'FAR' (project 'FAR') has copy command from '/Users/m/Desktop/Shubham
Code/Backup/Shubham 2018/SVN
Codes/FAR/FAR/FAR/ThirdParty/BPStatusBarAlert/Assets/.gitkeep' to
'/Users/m/Library/Developer/Xcode/DerivedData/FAR-
axuthwysrkuqbcdvfglntqgbiugn/Build/Products/Debug-iphonesimulator/F.A.R.app/.gitkeep'
2) Target 'FAR' (project 'FAR') has copy command from '/Users/m/Desktop/Shubham
Code/Backup/Shubham 2018/SVN
Codes/FAR/FAR/FAR/ThirdParty/BPStatusBarAlert/Classes/.gitkeep' to
'/Users/m/Library/Developer/Xcode/DerivedData/FAR-
axuthwysrkuqbcdvfglntqgbiugn/Build/Products/Debug-iphonesimulator/F.A.R.app/.gitkeep'
This can be resolved by following below steps :
Step 1 : Go to build Phases.
Step 2 : Copy bundle resources and remove the .gitkeep file.
Step 3 :Build and Success.
In your case some other file will create issue, So check the file name and delete it.
As per my investigation, issue is because of duplicacy of file.
Happy Coding.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With