Xcode 10 unexpected duplicate task: CopyPlistFile

Roman Podymov picture Roman Podymov · Sep 18, 2018 · Viewed 14.3k times · Source

Today I updated my Xcode from v.9.4.1 to v.10.0. Now I try to build my tvOS project and I see the following error: unexpected duplicate task: CopyPlistFile /Users/username/Library/Developer/Xcode/DerivedData/MyApplication/Build/Products/Debug-appletvos/MyApplication.app/Settings.plist /Users/username/project_folder/Settings.plist (in target 'MyApplicationTarget'). I tried to reinstall pods (I use CocoaPods 1.6.0 beta) and clean build folder, but it does not help. How can I solve this problem in Xcode 10?

Answer

NickDK picture NickDK · Sep 28, 2018

I was getting this for a core data model .xcdatamodeld, It turned out the model file was listed under both "Compile Sources" & "Copy Bundle resources" in Build Phases. Removed it from the latter and it build in Xcode 10 finally!