title: Command /usr/bin/codesign failed with exit code 1
body: <p>I have no idea why does this error appear when doing the final run for distribution before submitting to the iTunesConnect:</p>
  
  <pre><code>/Users/Val/Library/Developer/Xcode/DerivedData/Mathematics-dzakmzlewrmgvibasvuixiwmkwwp/Build/Products/Debug-iphoneos/Mathematics.app: replacing invalid existing signature
  /Users/Val/Library/Developer/Xcode/DerivedData/Mathematics-dzakmzlewrmgvibasvuixiwmkwwp/Build/Products/Debug-iphoneos/Mathematics.app: CSSMERR_TP_NOT_TRUSTED
  Command /usr/bin/codesign failed with exit code 1    
  </code></pre>
  
  <p>All of my certificates/profiles were made 2 minutes ago.<br>
  I read from another question that I should remove unneeded spaces from info.plist but there are no such!<br>
  I should note that I am running Xcode 4.1, reinstalled today.</p>