title: Code Sign error: The identity 'iPhone Distribution:' doesn't match any valid, non-expired certificate/private key pair.. Any solutions?
body: <p>I'm in the process of writing and deployment of my first iOS application. When I tried to build release build (flavour) of my project for real iOS device (I select <code>Release</code> in project schema and choose <code>Products-&gt;Archive</code>). I got an error as in the question title. Trying googling I found that it's a very popular error and only on stackoverflow there are nearly four threads for it. But trying to follow advices listed there changed nothing.
  I tried to change certificate keys preferences (code signing identity) in the Targets->Build Settings in different ways. I also tried to change them directly via <code>xcodebuild</code>. Eventualy, I've tried all the combinations (developer/distribution). May be this settings even don't relate to this problem - i don't know.
  So the question is there some exact solution for this problem?</p>