title: Cannot sign app in Xcode CSSMERR_TP_NOT_TRUSTED
body: <p>I have downloaded and installed the WWDR certificate.  I have tried setting it to Always Trust <em>and</em> system defaults.</p>
  
  <p>When I try to archive my app I get the CSSMERR_TP_NOT_TRUSTED error.</p>
  
  <p>If I try signing manually I get the same:</p>
  
  <blockquote>
    <p>/usr/bin/codesign --force --sign "3rd Party Mac Developer Application:
    XX XXX-XXX"
    /Users/XXX/Library/Developer/Xcode/DerivedData/XXX-fivqootinaolitdbpxccqykoaoqs/ArchiveIntermediates/XXX/InstallationBuildProductsLocation/Users/XXX/Applications/XXX.app</p>
    
    <p>/Users/xxx/Library/Developer/Xcode/DerivedData/xxx-fivqootinaolitdbpxccqykoaoqs/ArchiveIntermediates/xxx/InstallationBuildProductsLocation/Users/xxx/Applications/xxx.app:
    replacing invalid existing signature
    /Users/xxx/Library/Developer/Xcode/DerivedData/xxx-fivqootinaolitdbpxccqykoaoqs/ArchiveIntermediates/xxx/InstallationBuildProductsLocation/Users/xxx/Applications/xxx.app:
    CSSMERR_TP_NOT_TRUSTED</p>
  </blockquote>
  
  <p><strong>BUT</strong></p>
  
  <p>If I use</p>
  
  <blockquote>
    <p>sudo /usr/bin/codesign --force --sign</p>
  </blockquote>
  
  <p>Then it works....</p>
  
  <p>The key is installed in keychain access in the 'login' chain.</p>