Codesign is not a heap of fun

My Apple Developer certificate had expired so I had to get a new one. Having forked out the Apple-Tax I duly had a new certificate but…

codesign went into a loop prompting me for my password.

mdwrite popped up asking for permission on my metadata keychain which I didn’t know I had (seems is a file in ~/Library/Keychains).

And after all that nonsense the app wouldn’t run.

Message from debugger: Error 1

Not very helpful. I went off to find the crash report file (in ~/Library/DiagnosticReports) and that was more useful:

EXC_CRASH (Code Signature Invalid)


Digging deeper with codesign ---verify --verbose ~/…/MacOS/Mentat got me back:


Well that’s fine but what does it mean?

Checking my KeyChain my Apple Developer certificate was listed as “Not trusted” but why?

Eventually, someone in the Core Intuition Slack gave me that answer. My Apple WWDR certificate, although not expired, was out of date. So I downloaded and installed the latest certificate.

I nuked the DerivedData folder and built from scratch and I am back in business.

I’m glossing over the time I spent trying to figure this out, ask the wrong (and later righter) questions, and stare in despair at this problem not of my own making.

I’m grateful for the help or this would be baffling me yet.

Leave a Reply

Your email address will not be published. Required fields are marked *