title: Code Sign error: No unexpired provisioning profiles found that contain any of the keychain's signing certificates
body: <p>I think I've reached the nadir of <code>iOS</code> provisioning hell. After migrating to a new mac and doing an archive for distribution, I received the error:</p>
  
  <blockquote>
    <p>Code Sign error: No unexpired provisioning profiles found that contain
    any of the keychain's signing certificates</p>
  </blockquote>
  
  <p>I then erased all certs and keys and provision profiles and did a "hard reset" (deleting all keys, certs, and profiles), following Apple's instructions by hand, with the same error. Then I did another hard reset and then had Xcode handle the whole thing via the Organizer, did another archive - only to see the same error.</p>
  
  <p>I have all certs (<code>WDRCA</code>, <code>Developer ID Cert Authority</code>, <code>iPhone Dev</code>, <code>iPhone Distribution</code>) showing in Keychain Access, <code>Xcode</code> shows that it sees the dev and distribution certs, as well as the provisioning profiles, all marked with a green checkmark and "valid" status.</p>
  
  <p>Code signing within the app show the correct dev and distribution is selected.</p>
  
  <p>What's really troubling is that a Google search on the error shows <a href="http://developer.apple.com/library/ios/#technotes/tn2250/_index.html" rel="noreferrer">one tech note</a> from Apple that isn't very helpful, 2 tweets, and 3 results in Japanese - and nothing else. I contacted one of the tweeps and he said he fixed it with a hard result, which I have done twice.</p>
  
  <p>Any ideas on where to go or what to do next?</p>