I have been with this problem already 8 hours unable to solve it.
Whats Cool JLD$ codesign -vvvv build/Distribution-iphoneos/Whats\\ cool\\?.app
build/Distributi
In my case, I got that error because the disk image I created to distribute my app ran out of space and ditto did not copy all files from the build folder to the disk image. As the script I used generates so much noise, I missed the warning of ditto that it ran out of space in the target disk image. Unfortunately, ditto should have aborted the whole procedure, instead of burying the warning into a myriad of other paths of smaller files that it managed to copy.