Search code examples
swiftcompiler-errorsxcode6nsarchiving

Internal /bin/cp command failed. xCode compiler error


I'm working in Xcode trying to build a simple calendar app. As I tried to build and run I get this error

/Users/Zach/Downloads/Xcode-beta.app/COnonts/Developer/Toolchains/XcodeDefault.xctoolchain/
usr/bin/bitcode_strip: internal /bin/cp command failed.

Task Failed with exit 1 signal 0 {

All I know is that it gives me the error when this line is typed... It goes away when I comment it out.

            let ce = NSKeyedUnarchiver.unarchiveObject(with: eventObject as Data) as! CalenderEvent

UPDATE: I just tried to recompile and was given a new error.

"libswiftCore.dylib" couldn't be copied to "(A Document Being Saved BY Xcode)".

It appears like something is wrong with the swift std library. It randomly switches between the two errors.


Solution

  • I get this same error when I run low on disk space. Try moving the project to a different location, with more space, clean the project, and re-build.