Xcode 10: iPhone has denied the launch request.

Hi,


After i updated my Mac Mini to the OS X Mojave the Xcode 10 stop to launch my apps with the message: "iPhone has denied the launch request."

What is happened with the Xcode?

I tried to regenerate my certificates and everything else, but the problem continuous.


- iOS 12

- Mac OS X Mojave

- Xcode 10

It took me three days to solve problem. I found 2 solution. You can choose either of the two ways.


- Solution 1: open System Prefrences -> Users & Groups -> Add a user account (build with new user is successfully


- Solution 2: open Keychain Access -> choose System, All Items -> delete certificate Apple Worldwide Developer Relations Certification Authority


Detail: https://stackoverflow.com/a/52584195

I already filed a bug report to Apple. It seems like the reason causing this problem is the 'get-task-allow' flag of .mobileprovision file, which suppose to be set to true, but now is set to false instead. This 'false' flag causes Xcode losing the privilege to attach the target with debugger.

Thank you for your answer. Could you solve the probelm for you?

Unfortunately, no. The problem is caused by Apple's end since they issue the .mobileprovision file, and with free account we do not have the access to alter the flags in that file. The only thing we can do, I think, is waiting for Apple to take actions on this problem.


UPDATE (3/19/2019): Great news! It seems like Apple fixed the issue, now the .mobileprovision file has the 'get-task-allow' property set to true which means the debugger should work normally as before. Just remeber to do the followings:


  1. uncheck the Automatically manage signing option in the General tab of target settings
  2. fully close Xcode
  3. delete .mobileprovision files under ~/Library/MobileDevice/Provisioning Profiles/
  4. delete the following certificates in Keychain Access:
    • iPhone Developer: xxx@xxx.xxx (xxxxxxxxx)
    • Developer ID Certification Authority
    • Apple Worldwide Developer Relations Certification Authority
  5. remove the app you are working on from your iOS devices
  6. reboot your Mac and iOS devices
  7. launch Xcode
  8. change the Bundle Identifier to anything else (you might change it back after it works)
  9. re-check the Automatically manage signing option
  10. plug in your devices, click on Run, trust your certificate on your iOS devices
  11. it should work now

Neither of them worked!

neighter of those works....

I tried what you suggested multiple times, it simply doesn't work. It's driving me crazy

I'm beside myself with extreme fury and agitation. I tried everything, and nothing changed.😢

I have updated my method with more details, please try again.

You're a legend! Was trying for days but this works!

thanks a lot!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Thanks for the perfect step by step instructions

Great!! It works fine!! Thanks a lot!! 😎😎

Thank you so much. Finally, after so many days trying around this finally worked.

There is just one note: It is important to know that the provisioning profiles are stored in a hidden folder in the Library directory stored in the home directory of the user.

Hello,

For those who tried the 2 solutions but no work, I found another solution maybe you guys can try:


My solution is on your iPhone, in Setting -> Developer -> Reset Local Data on Next launch : turn it on.


For me, this is the only way making it work again.

Hope this can help you.

It's not an official solution, but I found the following way:


- Product > Scheme > Edit Scheme... > Run > Info > Launch - Select "Wait for executable to be launched"


When you run the app in xcode, the app is installed on your iPhone.

Then you have to run it yourself.

Xcode 10: iPhone has denied the launch request.
 
 
Q