Monday, March 18, 2019

Xcode Error: iPhone has denied the launch request

i've been testing my project on my iPhone for many months without any problem. Today, it stopped working. When I click the Run button in Xcode to run the app on my device, Xcode showed the error message. I've tried many solutions on the net like deleting the provisioning profile through the Keychain Access app but no luck.


Solution


- Open Keychain Access app then select login in the upper left pane and Certificates in the lower left pane
- In the right pane, select the item "iPhone Developer: <my-email>" and press delete


After deleting the provisioning profile, Xcode will perform code signing and install a new provisioning profile into your device again when you run the project.

I don't know why we have to delete it but before I deleted the certificate in the Keychain Access app, I saw its expiration date had passed already. Perhaps, there was a bug in Xcode that it couldn't renew the certificate automatically.


Workaround


- From within Xcode (v9), select Product > Scheme > Edit Scheme...
- Select Run from the left pane then click on the Info tab and uncheck "Debug executable" checkbox

Someone here said that it's because i'm using Adhoc provisioning profile and this workaround just hide the issue. It doesn't fix it.



Reference
https://stackoverflow.com/questions/45421179/xcode-9-error-iphone-has-denied-the-launch-request


No comments:

Post a Comment