我们在Xcode 10编译ios项目时,出现error: Multiple commands produce 'xxx'类似的错误,具体的错误代码如下所示:
error: Multiple commands produce '/Users/dxlawj/Library/Developer/Xcode/DerivedData/SinforChat-heyfvedklspziwftlxltyhkkvqbs/Build/Products/Debug-iphonesimulator/SinforChat.app/RGBColor.plist':
1) Target 'SinforChat' (project 'SinforChat') has copy command from '/Users/dxlawj/Documents/xcode/SinforChatGit/SinforChat/Contacts/Controller/Message/RGBColor.plist' to '/Users/dxlawj/Library/Developer/Xcode/DerivedData/SinforChat-heyfvedklspziwftlxltyhkkvqbs/Build/Products/Debug-iphonesimulator/SinforChat.app/RGBColor.plist'
2) Target 'SinforChat' (project 'SinforChat') has copy command from '/Users/dxlawj/Documents/xcode/SinforChatGit/SinforChat/Message/Model/RGBColor.plist' to '/Users/dxlawj/Library/Developer/Xcode/DerivedData/SinforChat-heyfvedklspziwftlxltyhkkvqbs/Build/Products/Debug-iphonesimulator/SinforChat.app/RGBColor.plist'
错误问题分析:
之所以我们的xcode在编译时出现上方的错误,时因为我们的Bundle Resource资源文件里面导入了两个“RGBColor.plist”文件,我们只需要删除一条重复的plist文件即可,在Build Phases里面找到重复的文件,如图所示:
删除掉第一条RGBColor.plist(Message/Model)即可,只要没有重复的资源文件,就不会报“error: Multiple commands produce”错误了。