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中有一个错误。


当前回答

实际上,你可以使用遗留的构建系统,但你不会得到快速的构建时间,即你不会得到新的构建系统的功能,已经在XCode10默认。这只是一个没有得到最新的构建功能https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes/build_system_release_notes_for_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.

对于cocoapods管理的依赖项目,通过提供本地podspec来排除信息来解决问题。请参考资料。以godzippa为例

Podfile pod 'Godzippa',:podspec =>“venders/ Godzippa .podspec”

厂商/ godzippa.podspec s.source_files = 'Sources/*.{h,m}'

尝试所有这些选项,这3个选项中的任何一个都会为你工作,肯定的

Option 1: Remove all files from

目标>>构建阶段>>编译源代码 目标>>构建阶段>>拷贝Bundle资源

Option 2: Change the build system

Xcode->File->Project Settings-> Build System -> Legacy Build System

Option 3: remove and update existing pod

pod缓存清理PromisesObjC pod缓存清理承诺 cd [your_project_dir] rm -rf Pods/ rm Podfile.lock 豆荚更新

I hope this will help you, Happy coding :-)

如果你使用CocoaPods,你可能想要尝试分解pod并重新安装。这对我很管用。

赛事deintegrate

正在安装

对于没有找到正确答案的同学因为这和info。plist没有关系。

我在开发一个macOS应用程序时遇到了这个问题,没有CocoaPods或Carthage,只有SPM包,手动将xcodeprojects拖到workplace。

当我只使用一个依赖时(它从内部使用Swift-NIO),一切都没问题,但当我添加一个又一个带有重叠子deps的依赖时,我遇到了这个讨厌的问题。

解决方案是尝试分别编译所有主要的依赖项(这将失败,因为在各自的.build文件夹中不存在签出文件夹,这很可能是因为您将pkg置于编辑模式(swift包编辑YourPkg…)

您只需取消编辑pkgs,并强制所有依赖项成功编译。之后,你必须确保你的主目标内的链接二进制文件没有重叠(我不确定这是否真的有必要,但以防万一)。

之后,一切都应该工作得很好:)