https://www.youtube.com/watch?v=z2LemT1_LqA

After several days of searching regarding the Xcode 8 bug on macOS Sierra: Command /usr/bin/codesign failed with exit code 1

I finally found a very simple video that solves the problem in less than 2 minutes!

Thanks again for this video, I hope it helps you too.