Unable to Sign Xamarin.Mac App – "Warning: unable to build chain to self-signed root"
I am trying to sign a Xamarin.Mac application using my Developer ID Application certificate in Visual Studio on macOS. The app is successfully built, but when I attempt to sign it using codesign, I receive the following warning and error:
Warning: unable to build chain to self-signed root for signer "Developer ID Application: Team ID()"
<path-to-app>/SFSecure.app: errSecInternalComponent
What I have tried so far:
- Verified that my Developer ID Application certificate appears correctly in Keychain Access under "My Certificates".
- Ran security find-identity -v -p codesigning and confirmed my Developer ID is listed.
- Ensured my login keychain is unlocked using
security unlock-keychain ~/Library/Keychains/login.keychain-db
4.Tried specifying the keychain explicitly using
security list-keychains -s ~/Library/Keychains/login.keychain-db
5.Checked for missing or expired WWDR (Worldwide Developer Relations) certificates and intermediate certificates in Keychain Access.
Despite these steps, the signing process still fails with the above error.
My Questions:
- What does the "unable to build chain to self-signed root" warning mean in this context?
- Is there an issue with the certificate trust chain, and how do I verify or fix it?
- What are the intermediate certificate requirements, and how do I ensure they are properly installed?
- Are there additional steps required for signing a Xamarin.Mac app correctly?
Any guidance on resolving this issue would be greatly appreciated.
MacBook Air, macOS 14.5