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

Accepted Reply

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

  • Regarding Solution 2. "If you’re running Xcode 11.4.1 or later, you’ll receive the updated certificate automatically when you sign an app after January 28, 2021. If you’re running an earlier release of Xcode and need to generate new certificates, download and install the new intermediate certificate..."

    The date of this post is 6/25/2021 I am running . At this time, deleting certificate Apple Worldwide Developer Relations Certification Authority did not suffice. And I had to get a new one and shove it under certificates in "Keychain Access" app.

    Before Adding the certificate my "Apple Development: [appleid] " certificate would show an error in red saying "certificate not trusted" when selected. After adding the certificate it shows "This certificate is valid" and consequentially I can now deploy to iPhone device. And this error was resolved.

    No search about this error code led me to this solution. Rather an attempt to resolve this error in red in the keychain Access app for my Apple Development Certificate.

    For reference of this related issue

Add a Comment

Replies

When does it occur ?

- when you try to install the app from XCode to the iphone ?

- when you launch on iPhone ?

- Is the iPhone connected to the Mac at this time ?

- which XCode version ? XCode 10 Release ?


Have you looked at this:

https://stackoverflow.com/questions/52415694/ipad-has-denied-the-launch-request-after-update-to-ios-12


But that seems to be an older problem, as described in the forum

https://forums.developer.apple.com/thread/89767

Hi,


The answers:

When does it occur ?

- when you try to install the app from XCode to the iphone ?

Yes. The app build successfully, but when opened on the iphone it crashed, with the dialog box in the XCode "Iphone has denied the launch request"

- when you launch on iPhone ?

Yes, like i described.

- Is the iPhone connected to the Mac at this time ?

Yes. With the original USB cable.

- which XCode version ? XCode 10 Release ?

Xcode 10 realese, NOT Beta.


Have you looked at this:

https://stackoverflow.com/questions/52415694/ipad-has-denied-the-launch-request-after-update-to-ios-12

Yes, but not helped me..


But that seems to be an older problem, as described in the forum

https://forums.developer.apple.com/thread/89767

Does it occur as well if you create a new app ?

Unfortunately yes 😟

I tried to use another iPhone with iOS 12 but not worked too.


Do you hava an ideia about what is happening?

I opened a Bug Reporter but not have any answer yet.

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

  • Regarding Solution 2. "If you’re running Xcode 11.4.1 or later, you’ll receive the updated certificate automatically when you sign an app after January 28, 2021. If you’re running an earlier release of Xcode and need to generate new certificates, download and install the new intermediate certificate..."

    The date of this post is 6/25/2021 I am running . At this time, deleting certificate Apple Worldwide Developer Relations Certification Authority did not suffice. And I had to get a new one and shove it under certificates in "Keychain Access" app.

    Before Adding the certificate my "Apple Development: [appleid] " certificate would show an error in red saying "certificate not trusted" when selected. After adding the certificate it shows "This certificate is valid" and consequentially I can now deploy to iPhone device. And this error was resolved.

    No search about this error code led me to this solution. Rather an attempt to resolve this error in red in the keychain Access app for my Apple Development Certificate.

    For reference of this related issue

Add a Comment

Thank you so much Duylinh!!!

I tried the Solution 2 and it worked perfect!!


Regards

Davi

Huge thanks! Spent the greater part of 2 evenings trying to figure this one out. I even went so far as to Factory Reset my phone.


Solution 2 did the trick, but I had to delete the certificate from login as well as System.

Same here. It needed to be deleted from BOTH places.


Thanks!

Nossa, também me matei aqui de tentativas e isso me ajudou.. OBRIGADOOO.

Sou nova nesse mundo IOS e meu como isso me atrapalhou .. mas valeu!!

It is working after changing "when using this certificate" property to "use system defaults" for developer certificate at "keychain access"

the same issue appear after applied this solution.

please help me to solve problem . this issue appear to me

" amr.ali’s iPhone has denied the launch request"

i try your solution but problem not solved please help me .

thanks alot .




For my environment, only solution 2 works.

My envrionment is Mac OS 10.14.1, XCode 10.1 and testing device is iOS12.1.


I did the following method.

(1) Quit XCode and complete stop it.

(2) Open KeyChain Access and select "System".

(3) Delete Apple Worldwide Developer Relations Certification Authority

(4) Close KeyChain Access.

(5) Start XCode and Clean project.

(6) Rebuild app.


The problem is "on the Fly to installing". Safari can not install the app. IOS devices shows a gray icon only.

It might be that the instraller looks a differnet positon of the code sign in the ipa file.

iOS12 and iOS12.1 might check a code sign in the different location of ipa file comparing with iOS10 and iOS11.

Because with "Apple Worldwide Developer Relations Certification Authority" in the Key Chain Access, the applicaiton can launch on

iOS10 and iOS11. And also, it is possible to install by safari.


I want to know how to show "when using this certificate" property in Key Chain Access.

Hello.


I had the same problem. And then I tried the followings:

I can debug my iOS12.1 device with XCode10.1.

Howeve when I upload the manifest and ipa filee for "Over-the-air" installation,

the icon of the installed app shows is gray.

I am trying to solve the problem.


It might be your KeyChain Access is broken or XCode internal data is broken.


KeyChain Access:


You might need to save your developer certificate by xxxxx.p12. style.

You need to save a pair of a key and a certificate.


(1) Open KeyChain Access

(2) Click "System" and select your develop/distribute certificate and right click to open menu.

(3) Select Write. The KeyChain asks a file name and a password.


And then you need to open "Key Chain" menu and select Preference.

Click "Reset Default". "Login" is going to erase. Don't worry, when you re-login, "Login" will back

in KeyChain.

Logout and login again or restart your mac.

Open KeyChain and select "Login". And then double click the saved xxxxx.p12 and enter the password.

Your certificate shows in your KeyChain.

You might need to add the distribution certificate.

And start XCode.


XCode:

In my case, I delete the following folders by "Terminal"

~/Library/Developer/Xcode

~/Library/Caches/com.apple.dt.Xcode

When you delete these folders, your previous archives are gone.


Restart XCode.

I can't believe Apple would break its users this way !


I finally got my apps to build again and launch after trying both solutions together.


Implementing both solutions at the same time should work for you given that the certificates are saved in the key chain System part.

if all your certificates reside in the Login part of the keychain, you'll probably have to either export your certificates to the login or recreate them.


Here is what I worked for me:

- Open System Prefrences -> Users & Groups -> Add a user account.

- Created a second Distribution Certificate on the Apple portal by requesting a certificate from the certificate Authority using the new account.

- Deleted my original Developer Certificate on the Apple portal and recreated it by using certificate signing request certificate used for the distribution certficate.

- Downloaded the newly created Distribution Certificate and develper certificate to my key chain.

- Created a developer provisioning profile using the newly created developer certificate for building in xcode.

- Created a distribution provisioning profile using the newly created distribution certificate for archiving and building the ipa.

- Finally on xcode, I chose manual build settings.

- updated xcode with the latest profiles created by going to xcode -> preferences -> select your account -> download profiles.

None of the 2 options worked for me. My issue was that I was logged in with a different apple ID on my iPhone, so make sure you are logged in with the development apple ID on both your iPhone and mac


// edit

Apple requires that you have the Apple Worldwide Developer Relations Intermediate Certificate installed, so I'm not sure it's a good idea to remove it

source https://developer.apple.com/support/certificates/expiration/