Could not launch "my App" ... denied launch request

I'm still struggling with this problem and I'm sick of it. This must not be affecting most people, but there are plenty of threads on this topic with no universal solutions that I've seen.


The alert:

Could not launch “my App”.

Your iPhone6 has denied the launch request.

[OK] button


On the console:

error: failed to launch '/private/var/containers/Bundle/Application/a-long-string-here/my App.app' -- [my] iPhone6 has denied the launch request.


A partial workaround is to edit my Product:Scheme:Edit Scheme... to "Ask on launch". This will allow the app to usually run and produce console output. You can then attach the Debugger, although you lose console output when you do that. In short, it's a neverending PITA and a huge time-waster.


Has anyone figured this out?

Accepted Reply

For what it's worth, resolving some layout contraint issues coincided with the problem going away this morning. Could be a coincidence but perhaps not.


[update a day later]

My good results are continuing. I do believe it was the solution.

Replies

There's a pretty good thread on this problem over at SO. Lots of potential fixes but none seem to work reliably for everyone. None have worked for me, although changing the Scheme to "Ask on launch" is a partial workaround.


htt ps://stackoverflow.com/questions/45421179/xcode-beta-error-iphone-has-denied-the-launch-request/47123776

For what it's worth, resolving some layout contraint issues coincided with the problem going away this morning. Could be a coincidence but perhaps not.


[update a day later]

My good results are continuing. I do believe it was the solution.

Happy for you. Don't forget to clse the thread on your solution.

This workaround is good but unfortunately your breakpoints don't work, which is useless in my case because I want to run it on device just to debug and encountering this problem.