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'

在Xcode 9中运行代码正常,但在Xcode 10中有一个错误。


当前回答

在开始之前,请注意我的项目使用Carthage作为依赖管理器。

这里没有一个现有的答案能解决我的问题。为我解决这个问题的方法如下。

First, I noticed that the build error pointed out one framework in particular. Next I filtered App Target > Build Phases for that framework. I noticed that that framework was present in both "Link Binary With Libraries" and "Embed Frameworks". Noting that none of the frameworks listed under "Embed Frameworks" were ones managed by Carthage I removed the framework in question from "Embed Frameworks". I then re-built my project and everything works fine including the functionality enabled by the framework in question.

其他回答

有类似的问题,但与。swiftdoc文件。

我在项目中有扩展和单元测试目标。并且它们具有与应用程序相同的“产品模块名称”(Build Settings中的PRODUCT_MODULE_NAME)。在让名字独一无二之后,问题就消失了。

有时出现这个问题的原因是你有多个目标,这些目标有不同的iOS部署目标。检查你的目标(例如你的主应用目标和你的扩展)是否有相同的iOS部署目标。

没有遗留构建系统 如果你有这样的Podfile

def shared_pods
  pod 'X'
end

target 'A' do
  shared_pods
end

target 'B' do
  shared_pods
end

B也依赖于A然后像这样把B移到A

 target 'A' do

   shared_pods

   target 'B' do
     inherit! :search_paths
   end
 end

如果你开发了私有cocoapod,并且已经通过Podfile添加了它,

从嵌入式二进制文件部分删除它:

在我的例子中,问题来自podcast文件。我必须将我的测试项目添加到podfile:

target 'MyApp' do
    pod 'Firebase'
    target 'MyAppTests' do
        inherit! :search_paths
        pod 'Firebase'
    end
end

之后,我需要执行:

pod update