I updated Xcode to version 7.2. Every time I edit some code then run the application, Xcode will display:
Could not launch "APP_NAME"
unable to attach
However, when I run the app again, it will run successful.
Indeed, I can run the application but I feel uncomfortable when I face this problem every time
You are not doing anything wrong; it happens from time to time. There is no need to clear data and restart the Mac. Just try the following:
Unplug and plug the device back in.
If still happens, restart Xcode.
Simply change your device setting go to Settings -> General -> Device Management-> Developer App -> your_provisional_profile -> and click on Trust this developer. Run the project again.You are done
This was completely screwed up in xcode 8.1, at least for extensions.
I've filed 29064806 with Apple.
The only recorse is to fallback to a version of xcode that works.
In my case that's 8.0 (where you get this not nearly as frequently)
I was having this problem while using Xcode 9.2 and iOS 11.2. After much googling, the only thing that solved all of my issues was turning off "Debug executable" in my scheme. This can be found under Product > Scheme > Edit Scheme > Run (on the left menu).
Prior to this, I tried a lot of different solutions including deleting my derived data, restarting my computer, and switching the launch in my scheme to "Wait for executable to be launched" instead of "Automatically". Switching the launch setting in my scheme allowed the app to launch on my phone, but the Xcode debugger and safari debugger still would not connect to my app.
This is the article where I found the solution: https://exceptionshub.com/xcode-beta-error-iphone-has-denied-the-launch-request.html
I had try this and it solve problem
it works for me
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.