Cocoa: Command /usr/bin/ditto failed with exit code 1

I am trying to build my project but it is not getting build.

I am getting the following error:

  • Enum case switch not found in type
  • Having app restart itself when it detects change to privacy settings
  • tableView crashes on end up with more than 16 items
  • Store NSArray In Core Data Sample Code?
  • Get XMPP Chat History OpenFire
  • Go back to view controller from SKScene
  • Command /usr/bin/ditto failed with exit code 1

    enter image description here

    I have cleaned my project but still is issue is persisting.

    Xcode Details:

    enter image description here

    EDIT Solution tried

    I went to ~/Library/Developer/Xcode/DerivedData and deleted everything inside the folder then went back to the Xcode and tried to build the solution. Getting the same error back Command /usr/bin/ditto failed with exit code 1

    4 Solutions Collect From Internet About “Cocoa: Command /usr/bin/ditto failed with exit code 1”

    clean your project and see whether it help or not

    Command-Shift K

    or

    Product > Clean

    Or check this link it may helps you: http://codica.pl/2015/12/25/taming-swift-compiler-bugs/

    All of sudden, It happens to my Mac app project today in Xcode 7.3.1.

    What I did :
    Clean >Clean build folder > Quit Xcode >Open Finder then go to

    ~/Library/Developer/Xcode/DerivedData

    then deleated everything inside >Open Xcode >Build >Run

    I think this is happening when something is wrong adding a file into Xcode.
    I have not encountered since readding myApp.help file without the option ‘Destination: Copy items if needed’.

    For Mac OS Sierra, this work for me:

    cd /Users/YOUR_USER_NAME/Library/Developer/Xcode/DerivedData

    then

    xattr -dr com.apple.FinderInfo *

    and then rebuild your project..

    and fix the error!

    Look at the error messages and find out which files are affected. Delete these files (remove references) and then add them again to your project’s target. It should work now.