简体   繁体   中英

Xcode 10 - Multiple commands produce .app

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.

I've got the same issue. If you are using Cocoapods, then you can solve the issue by upgrading to Cocoapods 1.5.3 from 1.4.0. as suggested in this post :

After that, just do pod install in the terminal.

I solved a similar issue by deintegrating cocoa pods and then installing it again.

I also cleared the derived data, then cleaned the code before running it again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM