Getting build error in Xcode (errSecInternalComponent)

I was building fine last week, now I am encountering this issue with any app I try to build to device (simulator is fine). I tried restarting.

CodeSign /Users/ericdolecki/Library/Developer/Xcode/DerivedData/tester-bmpjtoqbqywhazgsoimyxekummee/Build/Products/Debug-iphoneos/tester.app (in target 'tester' from project 'tester')

    cd /Users/ericdolecki/Desktop/tester

    export CODESIGN_ALLOCATE\=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate

    Signing Identity: "Apple Development: Eric Dolecki (223WWR97Y3)"

    Provisioning Profile: "iOS Team Provisioning Profile: *" (69757824-8a3f-4e03-8d1d-7a30f158d094)

    /usr/bin/codesign --force --sign B1DD1AA1862DBE2729D94B45C6D1DEECB58A7FD7 --entitlements /Users/ericdolecki/Library/Developer/Xcode/DerivedData/tester-bmpjtoqbqywhazgsoimyxekummee/Build/Intermediates.noindex/tester.build/Debug-iphoneos/tester.build/tester.app.xcent --timestamp\=none /Users/ericdolecki/Library/Developer/Xcode/DerivedData/tester-bmpjtoqbqywhazgsoimyxekummee/Build/Products/Debug-iphoneos/tester.app

Warning: unable to build chain to self-signed root for signer "Apple Development: Eric Dolecki (223WWR97Y3)"

/Users/ericdolecki/Library/Developer/Xcode/DerivedData/tester-bmpjtoqbqywhazgsoimyxekummee/Build/Products/Debug-iphoneos/tester.app: errSecInternalComponent

Command CodeSign failed with a nonzero exit code

How can I fix this?

Hmm. Seems like I had to go into Keychain Access > Certificates > Apple Worldwide Developer Relations Certificate Authority for one expiring in 2030 & change Trust to System Default. It was set to Always, and this fixed my issue.

Dropping this here in the hope that it improves the chances of folks finding it: Resolving errSecInternalComponent errors during code signing

Getting build error in Xcode (errSecInternalComponent)
 
 
Q