Certificate is not trusted mac keychain

Summary: Delete and reinstall WWDR and recreate certificate.

I came across a weird issue while making enterprise certificate from apple developer. I followed all the steps required to make a certificate. The steps whereas follows

  • Create a CSR file
  • Create a certificate on the developer centre
  • Upload CSR file
  • Generate and download certificate

Now the issue starts I double-clicked on the certificate and then proceeded to select that certificate and provisioning to create an enterprise build without any issue except the build will crash on launch after installation on a real device. The same code base however was working just fine when installed from TestFlight.

The Solution

It seemed that there is something wrong with the certificate and Xcode has failed to inform me. So I opened Keychain Access. Now when I selected my enterprise distribution certificate it was showing a red msg “This certificate is not trusted.” instead of “This certificate is valid“. Marking the certificate to trusted from certificate info didn’t help. After a few trials, I deleted and reinstalled Apple Worldwide Developer Relations Certification Authority certificate and reinstalled it. I recreated the enterprise distribution certificate and this time everything worked.

A pat on the back !!