Warning: unable to build chain to self-signed root for signer "Mac Developer: Dylan M (*******)"

I keep getting this Warning each time I test:


Warning: unable to build chain to self-signed root for signer "Mac Developer: Dylan M (*******)"


I have no Idea what it means and couldn't find any other case of it on the internet, could anyone help?

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.

Please try after reseting your keychain access password.

That works thanks (Xcode 9.1). hope Apple will fix it in next release .. 🙂

Thanks for your sharing. Can you tell me how to delete and reinstall Apple root and intermediate 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/

That did not work for me.


This warning persists, but apparently the codesign is still accepted.


spctl -a -t exec -vv /path/to/MyApp.app

accepted

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.

Tried all suggestions in thread and still get the same error: Warning: unable to build chain to self-signed root for signer "Apple Development: ....


I have not been successful in getting any help from Apple.

I may be late for this, but to solve this follow these steps...


xcode -> preferences -> accounts -> select the account -> manage certificate -> click on the + icon on the bottom left of the popup window -> ios development


you will see a new certificate created. Now you can run your app.

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.
40
@honey9 Thanks worked for me in Xcode 14 Beta 2.
@honey9
I am really appricated for your brallient solution, this worked for me very well. Tks a lot.
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.
28
Thanks  @FrostyBagg

This is the only thing that has worked for me in new Mac Mini
@honey9 It works like a charm, thank you!
After days of struggling, finally found the solution! 🎉🎊

Since this forum is not convenient I've posted it here on the stackoverflow

Hope it helps

I met this error as well and found a solution online which solved it.

****The key issue here is the root certificate. ****

  1. Delete all root certificate ("Apple Worldwide Developer Relations Certification Authority") from your Keychain Access. Click certificates and delete it from both LOGIN & SYSTEM (If both area have this certificate)

  2. Then download the latest cert through link below, and double click to add to keychain

https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer

Make sure it is in your Keychain's SYSTEM and you ONLY have ONE root certificate in your Keychain's SYSTEM area, NOT in LOGIN area.

@FrostyBagg

This works! thank you

For people who encounter the following error, PLEASE check the bold keywords to make sure it's the same problem

Code Signing /Users/***/Library/Developer/Xcode/DerivedData/Zuzu-halnevgbwzzefabntoduqfddqjay/Build/Products/Debug-iphoneos/YYY.app/Frameworks/ZZZZ.framework with Identity Apple Development: XXXXXX (YYYYYY) /usr/bin/codesign --force --sign 782277B24E70444CAB5460500BBC7ACCD0AEE368 --preserve-metadata=identifier,entitlements '/Users/pai/Library/Developer/Xcode/DerivedData/Zuzu-halnevgbwzzefabntoduqfddqjay/Build/Products/Debug-iphoneos/YYY.app/Frameworks/ZZZZ.framework' Warning: unable to build chain to self-signed root for signer "Apple Development: XXXXXX (YYYYYY)" /Users/pai/Library/Developer/Xcode/DerivedData/YYY-halnevgbwzzefabntoduqfddqjay/Build/Products/Debug-iphoneos/YYY.app/Frameworks/ZZZZ.framework: errSecInternalComponent Command PhaseScriptExecution failed with a nonzero exit code

@honey9 thanks for the pointer. In my case xcode some how screwed up access to my certificates and I had to manually go into keychain and set access to allow all, which fixed the issue.

It might help others with the same issue.

@honey9 your solution worked for me. Thanks a lot! Xcode 12.5.1 and XCode 13

@FrostyBagg this is the only solution in my Xamarin Project. Thank you.

You may have an expired cert.

  • Open Keychain Access
  • In Search filter enter certificate name ("Mac Developer: Dylan M (*******)")
  • If there's a matching expired cert, then delete it
  • There may now be just one valid cert matching - so retry the build
  • If needed go create new certificate

FYI, I had to create a new test project in Xcode and debug against the iPhone in order to get around the issue.

I was facing the same issue, I resolve it by adding the "Worldwide Developer Relations" intermediate certificat that match my code signing certificate. To find which "Worldwide Developer Relations" match you certificate, in keychain show up your code signing certificat details in the "Issuer Name" section identify the "Common Name" and the "Organizational Unit". Them download and install the corresponding certificat from https://www.apple.com/certificateauthority/

Warning: unable to build chain to self-signed root for signer "Mac Developer: Dylan M (*******)"
 
 
Q