Command /usr/bin/ditto failed with exit code 1 when archiving swift project

Hi,


I am running into this error Command /usr/bin/ditto failed with exit code 1 and i cant figure out where the issue is. I have a swift project with 3 schemes, Development. Staging and Release. The Staging scheme is a copy of the Release with a different product name and bundle identifier. When i build the project with the Staging scheme is succeeds. But when i try to archive it i get the following error.


Ditto /Users/m-wise/Library/Developer/Xcode/DerivedData/Butiqs-fabjzuthgrhwkaaxawfcdifwlqfi/Build/Intermediates/ArchiveIntermediates/Butiqs-STAGING/IntermediateBuildFilesPath/Butiqs.build/Beta-iphoneos/Butiqs.build/DerivedSources/ButiqsStag-Swift.h /Users/m-wise/Library/Developer/Xcode/DerivedData/Butiqs-fabjzuthgrhwkaaxawfcdifwlqfi/Build/Intermediates/ArchiveIntermediates/Butiqs-STAGING/IntermediateBuildFilesPath/Butiqs.build/Beta-iphoneos/Butiqs.build/Objects-normal/arm64/ButiqsStag-Swift.h

cd /Users/m-wise/M-Wise/Projects/butiqs

export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"


/usr/bin/ditto -rsrc /Users/m-wise/Library/Developer/Xcode/DerivedData/Butiqs-fabjzuthgrhwkaaxawfcdifwlqfi/Build/Intermediates/ArchiveIntermediates/Butiqs-STAGING/IntermediateBuildFilesPath/Butiqs.build/Beta-iphoneos/Butiqs.build/Objects-normal/arm64/ButiqsStag-Swift.h /Users/m-wise/Library/Developer/Xcode/DerivedData/Butiqs-fabjzuthgrhwkaaxawfcdifwlqfi/Build/Intermediates/ArchiveIntermediates/Butiqs-STAGING/IntermediateBuildFilesPath/Butiqs.build/Beta-iphoneos/Butiqs.build/DerivedSources/ButiqsStag-Swift.h

ditto: can't get real path for source '/Users/m-wise/Library/Developer/Xcode/DerivedData/Butiqs-fabjzuthgrhwkaaxawfcdifwlqfi/Build/Intermediates/ArchiveIntermediates/Butiqs-STAGING/IntermediateBuildFilesPath/Butiqs.build/Beta-iphoneos/Butiqs.build/Objects-normal/arm64/ButiqsStag-Swift.h'

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

Replies

Are you sure that the transient nature of derived data locales (simulator) isn't part of the issue?


Try selecting a device when archiving, instead of simulator.

did you ever find a solution to your issue? I'm seeing this problem right now with the exact same circumstances! Can't archive, get the same usr/bin/ditto error.

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

Thanks!


For me even a shorter solution worked: 'Clean' and then 'Build'.