1

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.Shared.targets(3,3): Error: Failed to codesign 'bin/iPhone/Release/PIAMA.iOS.app//Frameworks/Protobuf.framework/Protobuf': Warning: unable to build chain to self-signed root for signer "Apple Distribution: I am getting this error while build app on VS2019 Community for Mac, Xamarin. I have the latest updates for VS & Xamarin.

I also applied the cert mentioned here. https://developer.apple.com/support/expiration

The build goes well when I am in Release mode, but when I change it to Release|iPhone and connect my iPhone I get the following error.

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.Shared.targets(3,3): Error: Failed to codesign 'bin/iPhone/Release/[APPNAME].app//Frameworks/protobuf.framework/protobuf': Warning: unable to build chain to self-signed root for signer "Apple Development:

I checked the Project->Options->iOS Bundle Signing ->Signing Identity: Developer. Everything looks good here.

Any help is much appreciated.

trieunv
  • 11
  • 2
  • Print the chain and see if any certs in the chain are missing. This was a common bug for me, that i always had to manually install some middle "intermediate" cert. Did you also copy all certs to your iPhone, like "Apple Development"? – Charles Dec 19 '21 at 01:26
  • 1
    Does this answer your question? ["Warning: unable to build chain to self-signed root for signer" warning in Xcode 9.2](https://stackoverflow.com/questions/48911289/warning-unable-to-build-chain-to-self-signed-root-for-signer-warning-in-xcode). Google `iphone unable to build chain to self-signed root for signer Apple Development` shows many Q&As on this topic. – ToolmakerSteve Dec 19 '21 at 03:58

1 Answers1

5

Identifying the bad Certificates:

  1. open KeyChain
  2. Select "Login" select "Certificate" Category under it
  3. Find Apple Certs that has (BLUE + ) icon along with the name (first position)
  4. Double click that certs
  5. Expand the "Trust" section
  6. If it is messed up the "When using this Certificate" option will be selected as "Always Trust" along with the (+) icon

Resolving Bad Certificate problems:

  1. just set "Always Trust" option to "Use System Default"
  2. close small dialog window of keychain. You will be asking for Keychain password . Proceed with that and close
  3. repeat for all Disputed Apple Certificates.
  4. Close Keychain App
  5. Clean/ Deep Clean project in Xcode
  6. That is all / FIXED!!!

** If those type of(Blue Plus +) certificates don't present in Keychain at All when you are facing Warning. Please make change the All Applecertificate setting from " Use System Default" to "Always Trust" close Keychain. again open Keychain then perform above said resole procedure.

NSSurajit
  • 71
  • 1
  • 2