Xcode 10 Error: Multiple commands produce

2019-01-03 20:04发布

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 Xcode9 works, but results in an error in Xcode10.

30条回答
啃猪蹄的小仙女
2楼-- · 2019-01-03 20:47

This issue might be occurred because of multiple Plist or other files within App-

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

enter image description here

Note: If you have developed a watch app too then you will have to remove the plist from the watch and watch-extension too.

查看更多
我欲成王,谁敢阻挡
3楼-- · 2019-01-03 20:47

Try this Its Working :

In Xcode, go to File->Project/Workspace settings.

Change the build system to Legacy Build system.

查看更多
趁早两清
4楼-- · 2019-01-03 20:47

I had the same problem, I had a one more helper app in main App and copy this in resource. In my case solved as :-

1) Target -> 2)Build Phases 2) Copy File (n items) 3) Remove Copy File.

The Helper app automatically copied in Xcode 10.0.

enter image description here

查看更多
The star\"
5楼-- · 2019-01-03 20:47

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

查看更多
不美不萌又怎样
6楼-- · 2019-01-03 20:50

Go in Project Build Phase and Remove info.plist from the Compile Sources. It will remove that issue and project will be active again.

enter image description here

查看更多
我只想做你的唯一
7楼-- · 2019-01-03 20:50

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"

查看更多
登录 后发表回答