title: Why does Xcode auto-install a (duplicate and expired) certificate in the keychain?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/5264481/xcode-4-reinstalls-keychain-certs-that-i-delete">xCode 4 -reinstalls keychain certs that I delete</a>  </p>
  </blockquote>
  
  
  
  <p>The question says it all in a nutshell.</p>
  
  <p>When building a project in Xcode, I receive the error message from the Check dependencies step:</p>
  
  <pre><code>CodeSign error: Certificate identity 'iPhone Developer: xxxxx' appears more than once in the keychain. The codesign tool requires there only be one.
  </code></pre>
  
  <p>Problem is, this certificate identity is reinstalled whenever Xcode is launched.  It is an expired certificate too, that causes extra confusion.  So I delete it in keychain, and build the project and everything works.</p>
  
  <p>Quit Xcode, restart, watching Keychain, and TA-DA! the expired certificate reappears.</p>
  
  <p>I feel like I'm back on a virus-infected windows machine.</p>
  
  <p>Since the project builds and executes properly when the cert is deleted, the only problem is the automatic installation xcode does.  </p>
  
  <hr>
  
  <p>Edit:</p>
  
  <p>I think it's got to be related to an examination that xcode does of the keychain, for whatever reason.  Then xcode decides to install the cert based on its checkup of keychain, though it's a faulty decision.  I could probably solve this problem if I spent 24-48 hours, but I'm able to keep working, without quitting Xcode. :)</p>