Since upgrading to Xcode 8 I cannot run any app on my iPhone. The build fails with error:
error: Task failed with exit 0 signal 11
Damn Xcode...
After upgrading to High Sierra and Xcode 9, I have spend a lot of time... After combining all the answers here, I solved it in the following way.