相关文章推荐
飘逸的野马  ·  npm ...·  2 年前    · 

I am experiencing this exact same issue in Xcode 9.0.1 (9A1004) on macOS 10.13 when trying to debug on device running iOS 11.0.3 iPad or iPhone.


I have set both devices to allow trust running apps from this identity in Settings > General > Device Management. I have tried manually deleting all certificates from my computer keychain, then restarting Xcode and redownloading the certs anew, but the problem persists.

I solved my problem by:

- Removing all account information from Xcode and quitting Xcode.

- Open Keychain Access and delete all my certificates, as well as all Apple root and intermediate certificates.

- Manually resintall all Apple root and intermediate certificates.

- Relaunch Xcode and open Preferences > Accounts. Sign in to dev account, and select Download Manual Profiles.

I confirm that this solution solved my problem. Visual Studio for Mac 17.6.1 - build 452 Xcode 14.3.1 MacBook Pro

To reinstall Apple root certificates, go to your Apple developer account, click "Certificates", add a new certificate, scroll down to the bottom of the page and you will see "Intermediate Certificates".

Download and install the certificates.

Delete certificates from the Keychain Access app. In Keychain Access, make sure you have the proper keychain selected on the left pane. Select Certificates in the Category listing (again on the left). Contextual menu click on each certificate and select Delete.


To install Apple Root and Intermediate certificates manually, download the appropriate certificate and double-click on it. It should open Keychain Access and install. These certificates are available at https://www.apple.com/certificateauthority/

Likewise here, I've followed every suggestion in this thread and I still get the same original error.


Running the spctl command above indicates that the IPA is not signed correctly. (My problem is I need to modify the IPA after build and change some images, then re-sign it).


Any help would be appreciated.

There was no need for me to delete all my certs.

Identifying the bad certificate:


  1. From you Keychains select Login
  2. From Category select Certificates
  3. Find any Apple Certificate that has the blue +
  4. Double click on the certificate.
  5. Expand the Trust
  6. If it's messed up then the "When using this certificate" is set to "Always Trust" along with the blue +

Fixing the bad certificate:

  1. Just set it to "Use System Defaults" and close it.
  2. You'll get a pop up. Type in your password to update settings.
  3. Close KeyChain. Go back to your project, clean and run. Problem should have gone away.
  4. If that didn't work then go back to Keychain and just double check and see if there are any other Apple certificates that are set to Always Trust and repeat the process.

It has been exactly this. I had changed to "always trust" because I could not prepare my Apple Watch for development. Now it is back to Use System Defaults and it works.

This was the message before: Warning: unable to build chain to self-signed root for signer "(null)"

If none of the above works, download the WWDR Intermediate Certificate and drag and drop into your 'System' keychain. Don't put it in 'login' - I tried that myself and it did nothing to help me. Try to avoid changing the trust settings of your certificates, Xcode gave me a warning when it saw I had modified my development certificate's trust settings.
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Developer Forums Participation Agreement .
  • Forums
  • Terms of Use Privacy Policy License Agreements