Xcode 9 error: "iPhone has denied the launch request" Xcode 9 error: "iPhone has denied the launch request" xcode xcode

Xcode 9 error: "iPhone has denied the launch request"


It may be code sign issue. Make sure you're signing with developer, not distribution.


It happens using Xcode 9.x or newer.

I tracked this problem down to the "debug executable" checkbox in the product scheme (product->scheme->edit scheme->info->debug executable checkbox). I unchecked that and this stopped happening (as well as a couple other weird issues - no output in console being one).


I have a workaround:
If you change the scheme to 'Ask on Launch' it works.


In Xcode top bar

Product > Scheme > Edit Scheme > 'Info' tab > Executable:  "Ask on Launch"

http://upload-images.jianshu.io/upload_images/663014-d5d182e310052664.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240


It's slightly annoying but it works.