Xcode fails to codesign app when building for devices on macOS Sierra

Originator:cjwirth
Number:rdar://26913047 Date Originated:21-Jun-2016
Status:Duplicate of 27030600 (Open) Resolved:
Product:Developer Tools Product Version:
Classification:Serious Bug Reproducible:Always
 
Summary:
After updating to the macOS Sierra beta, the codesigning step of building an iOS (and probably macOS) application fails, giving this output:

> error: A cryptographic verification failure has occurred.
> *** error: Couldn't codesign /Users/cjwirth/Library/Developer/Xcode/DerivedData/mytest-bmsbmncjimxrwnfazbriqkilytuo/Build/Products/Debug-iphoneos/mytest.app/Frameworks/libswiftCore.dylib: codesign failed with exit code 1

This seems to be a pretty common problem:
https://forums.developer.apple.com/thread/48637
https://forums.developer.apple.com/thread/48765
https://stackoverflow.com/questions/37826242/could-not-code-sign-a-mac-app
http://stackoverflow.com/questions/37871624/getting-the-following-errors-with-xcode-8-any-advice-would-be-appreciated

Maybe related?
http://stackoverflow.com/questions/37823840/xcode-7-or-8-issue-with-pods-cant-run-at-all

Steps to Reproduce:
1. Install the macOS 10.12 Beta (16A201w)
2. Create new iOS application (eg. using the Single View template)
3. Try building for Generic iOS Device, or for an actual plugged in device
4. Build fails

Expected Results:
The application to successfully build and deploy to my device

Actual Results:
I get a codesigning error, and am unable to build and test the application.

Version:
macOS Sierra 10.12 Beta (16A201w)
Xcode Version 7.3.1 (7D1014) and Version 8.0 beta (8S128d)

^ Problem did not occur on Mac OS X 10.11 and Xcode Version 7.3.1 (7D1014)

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!