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?
In my project.pbxproj file I had these lines:
FIRSTSTRING /* Settings.plist in Sources */ = {isa = PBXBuildFile; fileRef = FIRSTSTRING /* Settings.plist */; };
SECONDSTRING /* Settings.plist in Resources */ = {isa = PBXBuildFile; fileRef = SECONDSTRING /* Settings.plist */; };
As I can see Settings.plist was specified twice in this file, as source and resource.
I removed Settings.plist from my project and added it again in Build Phases -> Copy Bundle Resources. Now I see that the lines I mentioned above are missing and I have this line in my project.pbxproj file:
THIRDSTRING /* Settings.plist in Resources */ = {isa = PBXBuildFile; fileRef = THIRDSTRING /* Settings.plist */; };
And now I am able to build my tvOS application with Xcode 10.0.