Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 10 - Multiple commands produce .app

Tags:

xcode

ios

xcode10

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?

like image 462
mag_zbc Avatar asked Sep 26 '18 13:09

mag_zbc


Video Answer


1 Answers

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.

like image 53
Shubham Narang Avatar answered Oct 27 '22 08:10

Shubham Narang