I you do a debug build and you get the error:
Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate. (-19011)
it might help to deactivate the checkbox
Project -> Edit Active Target -> Validate Build Product
in XCode.